728x90
반응형
k8s-master 에서 key 생성
[root@k8s-master ~]# cat ~/join.sh
kubeadm join 192.168.56.30:6443 --token ck42o0.xn7jry44rt6f198l --discovery-token-ca-cert-hash sha256:aaa4b9734d3ff758d7ca399041bd2569b6a90d562589bb6367746c39776ba8f2
k8s-node1 에서 k8s-master 으로 조인
[root@k8s-node1 ~]# kubeadm join 192.168.56.30:6443 --token ck42o0.xn7jry44rt6f198l --discovery-token-ca-cert-hash sha256:aaa4b9734d3ff758d7ca399041bd2569b6a90d562589bb6367746c39776ba8f2
[preflight] Running pre-flight checks
[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.
k8s-node2 에서 k8s-master 으로 조인
[root@k8s-node2 ~]# kubeadm join 192.168.56.30:6443 --token ck42o0.xn7jry44rt6f198l --discovery-token-ca-cert-hash sha256:aaa4b9734d3ff758d7ca399041bd2569b6a90d562589bb6367746c39776ba8f2
[preflight] Running pre-flight checks
[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.
join 완료
[root@k8s-master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s-master Ready control-plane,master 17m v1.22.0
k8s-node1 NotReady <none> 78s v1.22.0
k8s-node2 Ready <none> 74s v1.22.0
728x90
반응형
'TEAM STUDY > 대세는 쿠버네티스 [초급~중급]' 카테고리의 다른 글
▶ kubernetes - ConfigMap, Secret (0) | 2022.09.11 |
---|---|
▶ kubernetes - Volume (2) | 2022.09.11 |
▶ kubernetes - Object Service (4) | 2022.09.10 |
▶ kubernetes - 대시보드 접근 (2) | 2022.09.09 |
▶ kubernetes - 설치 에러 ,, 해결까지 ! (0) | 2022.09.09 |