Exercise 2.2: Deploy a New Cluster
CP로 SSH 접속
ssh student@CP_IP_ADDRESS컨트롤 플레인(마스터 노드) 구성 스크립트 실행
{ wget https://raw.githubusercontent.com/youngwjung/lf-training/main/LFD459/v1.24.1/solutions/s_02/k8scp.sh bash k8scp.sh | tee $HOME/cp.out }새로운 터미널을 열고 Worker로 SSH 접속
ssh student@WORKER_IP_ADDRESSWorker 노드 구성 스크립트 실행
{ wget https://raw.githubusercontent.com/youngwjung/lf-training/main/LFD459/v1.24.1/solutions/s_02/k8sWorker.sh bash k8sWorker.sh | tee $HOME/worker.out }CP 노드에 연결된 터미널로 이동
Worker 노드 조인 명령어 생성
kubeadm token create --print-join-command --ttl 0Worker 노드에 연결된 터미널로 이동해서 위의 명령어를 실행하고 나온 명령어를 루트 권한으로 (sudo) 실행
CP 노드에 연결된 터미널로 이동
kubectl 명령어에 대한 bash completion 설정
{ echo 'source <(kubectl completion bash)' >>~/.bashrc source <(kubectl completion bash) }Node 상태 확인
kubectl get nodeNode에 부여된 Taint 확인
kubectl get nodes \ -o=custom-columns=NodeName:.metadata.name,TaintKey:.spec.taints[*].key,TaintValue:.spec.taints[*].value,TaintEffect:.spec.taints[*].effectNode에 부여된 Taint 삭제
{ kubectl taint node node-role.kubernetes.io/master- --all kubectl taint node node-role.kubernetes.io/control-plane- --all }Node에 부여된 Taint 확인
kubectl get nodes \ -o=custom-columns=NodeName:.metadata.name,TaintKey:.spec.taints[*].key,TaintValue:.spec.taints[*].value,TaintEffect:.spec.taints[*].effect
Last updated