K8Snode的自定义状态信息

时间:2021-08-19
本文章向大家介绍K8Snode的自定义状态信息,主要包括K8Snode的自定义状态信息使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
[root@k8s-matser01 ~]# kubectl get node
NAME           STATUS                     ROLES                  AGE    VERSION
k8s-matser01   Ready,SchedulingDisabled   control-plane,master   103d   v1.20.2
k8s-work01     Ready                      <none>                 103d   v1.20.2
k8s-work02     Ready                      <none>                 103d   v1.20.2
[root@k8s-matser01 ~]# kubectl uncordon k8s-matser01
node/k8s-matser01 uncordoned
[root@k8s-matser01 ~]# kubectl get pod
No resources found in default namespace.
[root@k8s-matser01 ~]# kubectl get node
NAME           STATUS   ROLES                  AGE    VERSION
k8s-matser01   Ready    control-plane,master   103d   v1.20.2
k8s-work01     Ready    <none>                 103d   v1.20.2
k8s-work02     Ready    <none>                 103d   v1.20.2
[root@k8s-matser01 ~]# kubectl label nodes k8s-matser01  node-role.kubernetes.io/control-plane-
node/k8s-matser01 labeled
[root@k8s-matser01 ~]# 
[root@k8s-matser01 ~]# kubectl get node
NAME           STATUS   ROLES    AGE    VERSION
k8s-matser01   Ready    master   103d   v1.20.2
k8s-work01     Ready    <none>   103d   v1.20.2
k8s-work02     Ready    <none>   103d   v1.20.2

原文地址:https://www.cnblogs.com/Applogize/p/15161234.html