Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
528 views
in Technique[技术] by (71.8m points)

json - 法兰绒步骤中的Kubernetes安装错误(Kubernetes installation error in flannel step)

I am installing kubernetes using kubeadm on GCP Centos VM and I am getting the following error while running flannel step.

(我在GCP Centos VM上使用kubeadm安装kubernetes,运行绒布步骤时出现以下错误。)

Error:

(错误:)

[root@master ~]# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml
clusterrole.rbac.authorization.k8s.io/flannel created
clusterrolebinding.rbac.authorization.k8s.io/flannel created
serviceaccount/flannel created
configmap/kube-flannel-cfg created
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml": no matches for kind "DaemonSet" in version "extensions/v1beta1"
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml": no matches for kind "DaemonSet" in version "extensions/v1beta1"
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml": no matches for kind "DaemonSet" in version "extensions/v1beta1"
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml": no matches for kind "DaemonSet" in version "extensions/v1beta1"
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml": no matches for kind "DaemonSet" in version "extensions/v1beta1"

What changes shall I made in order to fix this?

(为了解决此问题,我应该进行哪些更改?)

  ask by Ishan Sharma translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

That's a versioning issue with the DaemonSet and your kubernetes cluster.

(这是DaemonSet和您的kubernetes集群的版本控制问题。)

You are using extensions/v1beta1 , but DaemonSets have been promoted to apps/v1 .

(您正在使用extensions/v1beta1 ,但DaemonSets已提升为apps/v1 。)

If you already have api-server running, try kubectl explain daemonset , and it will tell you what should be the apiVersion for the DaemonSets .

(如果您已经在运行api-server ,请尝试kubectl explain daemonset ,它将告诉您apiVersionDaemonSets应该是什么。)

If not, just download the flannel file, edit it, change the apiVersion: extensions/v1beta1 , by apiVersion: apps/v1 , and it should work.

(如果不是,只需下载绒布文件,对其进行编辑, apiVersion: extensions/v1beta1通过apiVersion: apps/v1更改apiVersion: extensions/v1beta1 ,它应该可以工作。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...