root@kube-master-node:/kube# kubectl get no
NAME               STATUS   ROLES           AGE   VERSION
kube-master-node   Ready    control-plane   80m   v1.31.2
kube-worker1       Ready    <none>          54m   v1.31.2
kube-worker2       Ready    <none>          54m   v1.31.2
root@kube-master-node:/kube# kubectl label node kube-worker1 node-role.kubernetes.io/worker=
node/kube-worker1 labeled
root@kube-master-node:/kube# kubectl get no
NAME               STATUS   ROLES           AGE   VERSION
kube-master-node   Ready    control-plane   82m   v1.31.2
kube-worker1       Ready    worker          55m   v1.31.2
kube-worker2       Ready    <none>          55m   v1.31.2
root@kube-master-node:/kube# kubectl label node kube-worker2 node-role.kubernetes.io/worker=
node/kube-worker2 labeled
root@kube-master-node:/kube# kubectl get no
NAME               STATUS   ROLES           AGE   VERSION
kube-master-node   Ready    control-plane   82m   v1.31.2
kube-worker1       Ready    worker          56m   v1.31.2
kube-worker2       Ready    worker          56m   v1.31.2
root@kube-master-node:/kube# kubectl label node kube-master-node node-role.kubernetes.io/master=
node/kube-master-node labeled
root@kube-master-node:/kube# kubectl get no
NAME               STATUS   ROLES                  AGE   VERSION
kube-master-node   Ready    control-plane,master   82m   v1.31.2
kube-worker1       Ready    worker                 56m   v1.31.2
kube-worker2       Ready    worker                 56m   v1.31.2
root@kube-master-node:/kube#
root@kube-master-node:/kube# kubectl label node kube-worker1 node-role.kubernetes.io/worker-
node/kube-worker1 unlabeled
root@kube-master-node:/kube# kubectl get no
NAME               STATUS   ROLES                  AGE   VERSION
kube-master-node   Ready    control-plane,master   88m   v1.31.2
kube-worker1       Ready    <none>                 61m   v1.31.2
kube-worker2       Ready    worker                 61m   v1.31.2
root@kube-master-node:/kube# kubectl label node kube-worker1 node-role.kubernetes.io/worker=
node/kube-worker1 labeled
root@kube-master-node:/kube# kubectl get no
NAME               STATUS   ROLES                  AGE   VERSION
kube-master-node   Ready    control-plane,master   90m   v1.31.2
kube-worker1       Ready    worker                 63m   v1.31.2
kube-worker2       Ready    worker                 63m   v1.31.2
root@kube-master-node:/kube#

'기술 노트 > kubernetes' 카테고리의 다른 글

kubeadm reset 오류  (0) 2024.11.03
kube init 재구성하는 방법  (0) 2024.11.03
pod가 terminating으로 남을 때  (0) 2024.11.02
minikube 설치하기  (0) 2023.09.25
macOS에서 kubernetes 설치하기  (0) 2023.09.25

+ Recent posts