[ Kubernetes ]
Cluster test
source <(kubectl completion bash)
echo "source <(kubectl completion bash)" >> ~/.bashrc
pod 실행
kubectl run hello-world --image=hello-world -it --restart=Never
kubectl get pods
kubectl delete pod hello-world
kubectl run tomcat --image=tomcat -it --restart=Never
kubectl logs tomcat
kubectl describe pods nginx
kubectl deployment
kubectl create deployment --image nginx nginx
kubectl get deployment
kubectl delete deployment nginx
kubectl deployment replicas
kubectl create deployment --image nginx nginx --replicas=3
kubectl get deployment
kubectl get pod
kubectl describe pod nginx-6799fc88d8-857ff | grep Node
Scale
kubectl scale --replicas=2 deployment/nginx
💡 명령어 정리
kubectl get pod -n kube-system
kubectl get pods --all-namespaces
kubectl describe pod [팟 이름]
kubectl get nodes
kubectl describe node [노드 이름]
![[Kubernetes] 클러스터 테스트: Pod와 Deployment 생성](/posts/kubernetes-cluster-test-pod-deployment/images/image_1.jpg)