cloudnativer / kube-install

一键安装k8s(kubernetes):二進位離線方式部署,支持定時安裝、添加與銷毀node、銷毀與修復master、一鍵卸載集羣等。Install k8s (kubernetes): one click offline installation of highly available multiple kubernetes cluster, supports schedule installation, addition of nodes, rebuild of kubernetes master, and uninstallation of clusters.
Apache License 2.0
413 stars 111 forks source link

集群安装成功后,在master节点上执行kubectl get nodes -A命令时只能看到两个工作节点,看不到master节点 #24

Closed haolipeng closed 2 years ago

haolipeng commented 2 years ago

image

haolipeng commented 2 years ago

搭建环境 master :192.168.29.141 node1 :192.168.29.142 node2:192.168.29.143 采用普通方式搭建的集群,执行kubectl get nodes -A 时,是能看到既有master节点,也有node节点的

houseonline commented 2 years ago

如果你使用kubeadm的安裝方式,是使用容器來部署k8s,所以你會看見master和node都在容器裡面。然後get出來,發現master、node都在node列表中。

kube-install是純二進制的安裝,與kubeadm有著本質區別,node列表中只有node。 kube-install是希望返璞歸真,讓node是node,master是master。 master只是一個管控程序,不運行業務容器的。只有node才是真正運行容器的計算主機。

你可以用kubectl get cs查看master和etcd狀態。你可以用kubectl get node查看node狀態。

haolipeng commented 2 years ago

非常感谢,明白了

haolipeng commented 2 years ago

问题已经得到解决