没有与“部署"类型匹配的内容在版本“扩展/v1beta1"中, [英] no matches for kind "Deployment" in version "extensions/v1beta1"

查看:190
本文介绍了没有与“部署"类型匹配的内容在版本“扩展/v1beta1"中,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在部署mojaloop时,Kubernetes会出现以下错误:

While deploying mojaloop, Kubernetes responds with the following errors:

错误:验证失败:[无法识别":没有同类匹配项 部署"版本"apps/v1beta2"中无法识别":否 匹配种类部署"在版本"extensions/v1beta1"中,无法 识别":没有匹配项"StatefulSet"在版本中 "apps/v1beta2",无法识别":没有同类匹配项 "StatefulSet";在版本"apps/v1beta1"中

Error: validation failed: [unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta2", unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1", unable to recognize "": no matches for kind "StatefulSet" in version "apps/v1beta2", unable to recognize "": no matches for kind "StatefulSet" in version "apps/v1beta1"]

我的Kubernetes版本是1.16.
如何解决API版本的问题?
通过调查,我发现Kubernetes不支持apps/v1beta2,apps/v1beta1.
如何让Kubernetes使用未弃用的版本或其他受支持的版本?

My Kubernetes version is 1.16.
How can I fix the problem with the API version?
From investigating, I have found that Kubernetes doesn't support apps/v1beta2, apps/v1beta1.
How can I make Kubernetes use a not deprecated version or some other supported version?

我是Kubernetes的新手,任何可以支持我的人都感到幸福

I am new to Kubernetes and anyone who can support me I am happy

推荐答案

在Kubernetes 1.16中,某些api已被更改.

In Kubernetes 1.16 some apis have been changed.

您可以使用

$ kubectl api-resources | grep deployment
deployments                       deploy       apps                           true         Deployment

这意味着只有带有apps的apiVersion对于部署是正确的(extensions不支持Deployment).与StatefulSet相同的情况.

This means that only apiVersion with apps is correct for Deployments (extensions is not supporting Deployment). The same situation with StatefulSet.

您需要将Deployment和StatefulSet apiVersion更改为apiVersion: apps/v1.

You need to change Deployment and StatefulSet apiVersion to apiVersion: apps/v1.

如果这没有帮助,请将您的YAML添加到问题中.

If this does not help, please add your YAML to the question.

编辑 由于问题是由1.16版本不支持的部署中包含旧apiVersions的HELM模板引起的,因此有2种可能的解决方案:

EDIT As issue is caused by HELM templates included old apiVersions in Deployments which are not supported in version 1.16, there are 2 possible solutions:

1..git clone整个存储库,并使用脚本
在所有template/deployment.yaml中将apiVersion替换为apps/v1. 2..当验证器将extensions作为apiVersion用作DeploymentStatefulSet时,请使用Kubernetes的较早版本(1.15).

1. git clone whole repo and replace apiVersion to apps/v1 in all templates/deployment.yaml using script
2. Use older version of Kubernetes (1.15) when validator accept extensions as apiVersion for Deployment and StatefulSet.

这篇关于没有与“部署"类型匹配的内容在版本“扩展/v1beta1"中,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆