kubectl 创建服务报no matches version extensions/v1beta1
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kubectl 创建服务报no matches version extensions/v1beta1相关的知识,希望对你有一定的参考价值。
故障现象:执行 kubectl create -f filebeat.yml
报错如下:
error: unable to recognize "filebeat.yml": no matches for kind "DaemonSet" in version "extensions/v1beta1"
解决办法:
将yml配置文件内的api接口修改为 apps/v1 ,导致原因为之间使用的kubernetes 版本是1.14.x版本,1.16.x 版本放弃部分API支持!
参考地址:
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.16.md#deprecations-and-removals
API
The following APIs are no longer served by default:
All resources under apps/v1beta1 and apps/v1beta2 - use apps/v1 instead
daemonsets, deployments, replicasets resources under extensions/v1beta1 - use apps/v1 instead
networkpolicies resources under extensions/v1beta1 - use networking.k8s.io/v1 instead
podsecuritypolicies resources under extensions/v1beta1 - use policy/v1beta1 instead
Serving these resources can be temporarily re-enabled using the --runtime-config apiserver flag.
以上是关于kubectl 创建服务报no matches version extensions/v1beta1的主要内容,如果未能解决你的问题,请参考以下文章
k8s集群搭建报错:error:kubectl get csr No resources found.
k8s集群搭建报错:error:kubectl get csr No resources found.
k8s集群搭建报错:error:kubectl get csr No resources found.
k8s单节点部署报错:[root@master ~]# kubectl get nodes No resources found.
k8s单节点部署报错:[root@master ~]# kubectl get nodes No resources found.
k8s单节点部署报错:[root@master ~]# kubectl get nodes No resources found.