最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

k8s node節(jié)點(diǎn)重新加入master集群的實(shí)現(xiàn)

 更新時(shí)間:2021年02月22日 10:38:10   作者:Scarborought  
這篇文章主要介紹了k8s node節(jié)點(diǎn)重新加入master集群的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧

1、刪除node節(jié)點(diǎn)

執(zhí)行kubectl delete node node01

2、這時(shí)如果直接執(zhí)行加入,會(huì)報(bào)錯(cuò)。如下:

[root@k8s-node02 pki]# kubeadm join 192.168.140.128:6443 --token abcdef.0123456789abcdef   --discovery-token-ca-cert-hash sha256:a3d9827be411208258aea7f3ee9aa396956c0a77c8b570503dd677aa3b6eb6d8 
[preflight] Running pre-flight checks
 [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.12. Latest validated version: 18.09
error execution phase preflight: [preflight] Some fatal errors occurred:
 [ERROR FileAvailable--etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists
 [ERROR FileAvailable--etc-kubernetes-bootstrap-kubelet.conf]: /etc/kubernetes/bootstrap-kubelet.conf already exists
 [ERROR Port-10250]: Port 10250 is in use
 [ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

 解決方案:

根據(jù)報(bào)錯(cuò)可以看到端口被占用,配置文件可ca證書(shū)已經(jīng)生成,所以需要?jiǎng)h除這些配置文件和證書(shū),并且kill掉占用的端口。建議刪除之前先備份。

[root@k8s-node02 pki]# lsof -i:10250
COMMAND PID USER  FD  TYPE DEVICE SIZE/OFF NODE NAME
kubelet 694 root  30u IPv6 26021   0t0 TCP *:10250 (LISTEN)
[root@k8s-node02 pki]# kill -9 694
[root@k8s-node02 pki]# cd /etc/kubernetes/
[root@k8s-node02 kubernetes]# ls
bootstrap-kubelet.conf kubelet.conf manifests pki
[root@k8s-node02 kubernetes]# mv bootstrap-kubelet.conf bootstrap-kubelet.conf_bk
[root@k8s-node02 kubernetes]# mv kubelet.conf kubelet.conf_bk
[root@k8s-node02 kubernetes]# cd pki/
[root@k8s-node02 pki]# ls
ca.crt
[root@k8s-node02 pki]# rm -rf ca.crt 

3、再次執(zhí)行加入,又出現(xiàn)報(bào)錯(cuò)。

[root@k8s-node02 ~]# kubeadm join 192.168.140.128:6443 --token abcdef.0123456789abcdef   --discovery-token-ca-cert-hash sha256:a3d9827be411208258aea7f3ee9aa396956c0a77c8b570503dd677aa3b6eb6d8 
[preflight] Running pre-flight checks
 [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.12. 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...
[kubelet-check] Initial timeout of 40s passed.
error execution phase kubelet-start: error uploading crisocket: timed out waiting for the condition

解決方案:

執(zhí)行kubeadm reset子節(jié)點(diǎn)重置

[root@k8s-node02 ~]# 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
W0710 10:22:57.487306  31093 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.

4、最后執(zhí)行加入,問(wèn)題解決。

[root@k8s-node02 ~]# kubeadm join 192.168.140.128:6443 --token abcdef.0123456789abcdef   --discovery-token-ca-cert-hash sha256:a3d9827be411208258aea7f3ee9aa396956c0a77c8b570503dd677aa3b6eb6d8 
[preflight] Running pre-flight checks
 [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.12. 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.

5、查看master節(jié)點(diǎn),加入成功。

[root@k8s-master01 ~]# kubectl get nodes
NAME      STATUS  ROLES  AGE  VERSION
k8s-master01  Ready  master  120m  v1.15.1
k8s-node01   Ready  <none>  100m  v1.15.1
k8s-node02   Ready  <none>  83m  v1.15.1

到此這篇關(guān)于k8s node節(jié)點(diǎn)重新加入master集群的實(shí)現(xiàn)的文章就介紹到這了,更多相關(guān)k8s node master集群內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • node.js 全局變量的具體使用

    node.js 全局變量的具體使用

    這篇文章主要介紹了node.js 全局變量的具體使用,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-04-04
  • node.js中使用Export和Import的方法

    node.js中使用Export和Import的方法

    這篇文章主要介紹了node.js中使用Export和Import的方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-09-09
  • Nodejs?Socket連接池及TCP?HTTP網(wǎng)絡(luò)模型詳解

    Nodejs?Socket連接池及TCP?HTTP網(wǎng)絡(luò)模型詳解

    這篇文章主要為大家介紹了Nodejs?Socket連接池及TCP?HTTP網(wǎng)絡(luò)模型,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-08-08
  • nodejs子進(jìn)程child_process和cluster模塊深入解析

    nodejs子進(jìn)程child_process和cluster模塊深入解析

    本文從node的單線程單進(jìn)程的理解觸發(fā),介紹了child_process模塊和cluster模塊,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-09-09
  • Node.js使用http模塊實(shí)現(xiàn)后臺(tái)服務(wù)器流程解析

    Node.js使用http模塊實(shí)現(xiàn)后臺(tái)服務(wù)器流程解析

    這篇文章將會(huì)教會(huì)你前端工程師怎么搭建后臺(tái)服務(wù)器,做自己的后端開(kāi)發(fā),同時(shí),在這篇文章開(kāi)始你就開(kāi)始正式進(jìn)入全棧的道路咯!本片文章將細(xì)解http模塊,在開(kāi)始前我們將復(fù)習(xí)一點(diǎn)計(jì)算機(jī)網(wǎng)絡(luò)的知識(shí)
    2022-09-09
  • NodeJs爬蟲(chóng)框架Spider基礎(chǔ)使用教程

    NodeJs爬蟲(chóng)框架Spider基礎(chǔ)使用教程

    這篇文章主要為大家介紹了NodeJs爬蟲(chóng)框架Spider基礎(chǔ)使用教程,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-07-07
  • Nodejs 識(shí)別圖片類型的方法

    Nodejs 識(shí)別圖片類型的方法

    這篇文章主要介紹了Nodejs 識(shí)別圖片類型的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-08-08
  • 淺談Node異步編程的機(jī)制

    淺談Node異步編程的機(jī)制

    本篇文章主要介紹了淺談Node異步編程的機(jī)制,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-10-10
  • NodeJs超長(zhǎng)字符串問(wèn)題處理的詳細(xì)分析

    NodeJs超長(zhǎng)字符串問(wèn)題處理的詳細(xì)分析

    這篇文章主要給大家介紹了關(guān)于NodeJs超長(zhǎng)字符串問(wèn)題處理的詳細(xì)分析,文中通過(guò)實(shí)例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2023-02-02
  • node檢測(cè)端口可用性的實(shí)踐示例

    node檢測(cè)端口可用性的實(shí)踐示例

    本文主要介紹了node檢測(cè)端口可用性的實(shí)踐示例,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-02-02

最新評(píng)論

西贡区| 仙桃市| 株洲县| 巩留县| 义马市| 耿马| 大姚县| 平阴县| 三江| 六安市| 宣城市| 漯河市| 海伦市| 德清县| 巢湖市| 乐山市| 措勤县| 行唐县| 巴里| 凤阳县| 栾川县| 武鸣县| 邵阳县| 武胜县| 高要市| 蓬莱市| 石林| 阜南县| 丰都县| 南丰县| 浦东新区| 陆丰市| 通海县| 中西区| 霸州市| 边坝县| 枣庄市| 西昌市| 体育| 渝北区| 祁门县|