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

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

问题描述

在部署mojaloop .kubernetes时出现问题,例如错误日志

I have been having the issue while deploying mojaloop .kubernetes is responding with an error log like

我检查了我的Kubernetes版本,而1.16是该版本,那么我该如何解决API版本的这种问题.从调查中发现Kubernetes不支持apps/v1beta2,apps/v1beta1,所以我该如何使Kubernetes使用当前未弃用的版本或受支持的版本 我是Kubernetes的新手,任何可以支持我的人都很高兴

I have checked my Kubernetes version and 1.16 is the version so how can I fix such kind of problem with the API version .from investigating I have found that Kubernetes don't support apps/v1beta2, apps/v1beta1 so how can I make Kubernetes to use currently not deprecated version or supported version I am new to Kubernetes and anyone who can support me I am happy

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

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已被更改.

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和StatefuSet apiVersion更改为apiVersion: apps/v1.

You just need change Deployment and StatefuSet 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用作DeployentStatefulSet时,请使用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 Deployent and StatefulSet.

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

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