2017-10-18 92 views
0

我試圖用--cloud-provider=aws標誌運行kubelet但它失敗,出現以下錯誤:Kubernetes「無法註冊節點」與雲提供商= AWS

kubelet_node_status.go:107] Unable to register node "ip-172-28-68-69.eu-west-1.compute.internal" with API server: nodes "ip-172-28-68-69.eu-west-1.compute.internal" is forbidden: node "k8s-master.my.fqdn" cannot modify node "ip-172-28-68-69.eu-west-1.compute.internal"

我已經嘗試過--host-override標誌設置爲"k8s-master.my.fqdn"沒有成功。

(kubectl get nodes: 
NAME     STATUS ROLES  AGE  VERSION 
k8s.my.fqdn    Ready  <none> 29m  v1.8.1) 

我應該如何開始kubelet才能成功註冊到AWS?

+0

你能弄明白嗎?我有同樣的問題 – Sibtain

回答

0

我用這種方式解決了我的問題: 1.請勿將默認的亞馬遜主機名更改爲您自己的,因爲--host-override標誌不起作用。 2.初始化節點如:kubeadm init --pod-network-cidr=10.233.0.0/16 --node-name=$(curl http://169.254.169.254/latest/meta-data/local-hostname)或簡單地使用kubespray作爲集羣管理解決方案。

順便說一句,如果你想與亞馬遜集成,最好留下亞馬遜主機名。同樣我在kubespray文檔中找到:

The next step is to make sure the hostnames in your inventory file are identical to your internal hostnames in AWS. This may look something like ip-111-222-333-444.us-west-2.compute.internal

相關問題