만들기/EagleEye
[EagleEye][환경세팅] 쿠버네티스 설치 3 - 워커노드 세팅
pythaac
2022. 5. 14. 04:12
https://computingforgeeks.com/deploy-kubernetes-cluster-on-ubuntu-with-kubeadm/
Install Kubernetes Cluster on Ubuntu 20.04 with kubeadm | ComputingForGeeks
Kubernetes is a tool for orchestrating and managing containerized applications at scale on on-premise server or across hybrid cloud environments. Kubeadm is a
computingforgeeks.com
워커 노드 추가
- 마스터 노드/워커 노드에 host추가
>> sudo vi /etc/hosts
# example
192.168.1.1 control
192.168.1.2 worker1
192.168.1.3 worker2
192.168.1.4 worker3
- host 이름 바꾸기
- 전부 ubuntu라 이름이 겹쳐서 참여되지 않음
>> - 워커 노드에서 클러스터 참여
>> sudo kubeadm join 192.168.1.7:6443 --token bovee8.4jgjpcv6rfrvqfvk --discovery-token-ca-cert-hash sha256:63651f0d5f506d81feefd5b59dbe83ce0f47d4793e7dc57e3b39116b6ac781c4 --v=2
- control plane에서 노드 확인
>> kubectl get no
- 클러스터에 deploy 테스트
>> kubectl apply -f https://k8s.io/examples/pods/commands.yaml - pod 확인
>> kubectl get pods