Label을 부여하여, pod 할당시 node를 특정하기 위함
아래는 label 부여 과정
$ kubectl get nodes --show-labels
NAME STATUS ROLES AGE VERSION LABELS
seungbae-pn41 Ready <none> 28d v1.24.0-2+59bbb3530b6769 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=seungbae-pn41,kubernetes.io/os=linux,microk8s.io/cluster=true,node.kubernetes.io/microk8s-controlplane=microk8s-controlplane
kube-worker Ready <none> 16d v1.24.0-2+59bbb3530b6769 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=kube-worker,kubernetes.io/os=linux,microk8s.io/cluster=true,node.kubernetes.io/microk8s-worker=microk8s-worker
# add label
$ kubectl label nodes seungbae-pn41 node-role.kubernetes.io/master=0
$ kubectl label nodes kube-worker node-role.kubernetes.io/worker=0
# remove label
$ kubectl label nodes seungbae-pn41 node-role.kubernetes.io/master-
# get node info
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
seungbae-pn41 Ready master 28d v1.24.0-2+59bbb3530b6769
kube-worker Ready worker 16d v1.24.0-2+59bbb3530b6769
# run at host
$ microk8s config > kubeconfig
# run at client
$ brew install kubectl
$ mkdir ~/.kube
$ scp kubem:/home/seungbae/home-kube/kubeconfig ~/.kube/config
$ chmod 700 ~/.kube/config # user only mode
$ kubectl config view