91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

k8s集群刪除和添加node節點

發布時間:2020-08-18 09:33:38 來源:ITPUB博客 閱讀:564 作者:z597011036 欄目:云計算

  在已有k8s云平臺中誤刪除node節點,然后將誤刪除的節點添加進集群中。如果是一臺新服務器必須還要安裝docker和k8s基礎組件。

1.查看節點數和刪除node節點(master節點)

[root@k8s01 ~]# kubectl  get nodes
NAME    STATUS   ROLES    AGE   VERSION
k8s01   Ready    master   40d   v1.15.3
k8s02   Ready    <none>   40d   v1.15.3
k8s03   Ready    <none>   40d   v1.15.3

[root@k8s01 ~]# kubectl  delete nodes k8s03
node "k8s03" deleted
[root@k8s01 ~]# kubectl  get nodes
NAME    STATUS   ROLES    AGE   VERSION
k8s01   Ready    master   40d   v1.15.3
k8s02   Ready    <none>   40d   v1.15.3
[root@k8s01 ~]#

2.在被刪除的node節點清空集群信息

[root@k8s03 ~]# kubeadm reset
[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]: y
[preflight] Running pre-flight checks
W1017 15:43:41.491522    3010 removeetcdmember.go:79] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] No etcd config found. Assuming external etcd
[reset] Please, manually reset etcd to prevent further issues
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[reset] Deleting contents of stateful directories: [/var/lib/kubelet /etc/cni/net.d /var/lib/dockershim /var/run/kubernetes]
The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually.
For example:
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system's IPVS tables.

The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
[root@k8s03 ~]# 

3.在master節點查看集群的token值

[root@k8s01 ~]# kubeadm token create --print-join-command
kubeadm join 192.168.54.128:6443 --token mg4o13.4ilr1oi605tj850w     --discovery-token-ca-cert-hash sha256:363b5b8525ddb86f4dc157f059e40c864223add26ef53d0cfc9becc3cbae8ad3
[root@k8s01 ~]#

4.將node節點重新添加到k8s集群中

[root@k8s03 ~]# kubeadm join 192.168.54.128:6443 --token mg4o13.4ilr1oi605tj850w     --discovery-token-ca-cert-hash sha256:363b5b8525ddb86f4dc157f059e40c864223add26ef53d0cfc9becc3cbae8ad3
[preflight] Running pre-flight checks
 [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
 [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.2. Latest validated version: 18.09
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.15" ConfigMap in the kube-system namespace
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Activating the kubelet service
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.
Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

[root@k8s03 ~]# 

5.查看整個集群狀態

[root@k8s01 ~]# kubectl  get nodes
NAME    STATUS   ROLES    AGE   VERSION
k8s01   Ready    master   40d   v1.15.3
k8s02   Ready    <none>   40d   v1.15.3
k8s03   Ready    <none>   41s   v1.15.3
[root@k8s01 ~]#

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

长宁县| 开鲁县| 建湖县| 汕头市| 舟山市| 天津市| 江永县| 怀柔区| 洛宁县| 宜兰市| 金山区| 屏山县| 永寿县| 龙江县| 新建县| 黑水县| 大姚县| 博湖县| 股票| 永清县| 聊城市| 荣成市| 临桂县| 娄底市| 泰州市| 定兴县| 正宁县| 平塘县| 浦城县| 鄂尔多斯市| 泾川县| 胶南市| 杭锦旗| 平果县| 西藏| 荣成市| 航空| 肥城市| 瑞丽市| 车险| 白山市|