Docker 설치 및 설정 또는 Cri-o 설치 및 설정을 마친뒤 Kubernetes 설치 및 Master-node 설정 과정을 마친 후 "kubeadm init" 명령 수행 결과의 마지막 부분의 kubeadm~ 명령을 실행한다.
# keepalived/haproxy 조합이 있을 경우 haproxy의 port를 입력해야한다.
sudo kubeadm join 192.168.192.168:6443 --token $WORKER_JOIN_TOKEN \
--discovery-token-ca-cert-hash sha256:$WORKER_JOIN_DISCOVERY_TOKEN_CA_CERT_HASH
[preflight] Running pre-flight checks
[WARNING Hostname]: hostname "kubernetes-02" could not be reached
[WARNING Hostname]: hostname "kubernetes-02": lookup kubernetes-02 on 10.32.192.11:53: no such host
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[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] Starting the kubelet
[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.