파드(Pod) 관련 명령어
✅ 파드 조회
kubectl get pods
✅ 파드 포트 포워딩
kubectl port-forward pod/nginx-pod 80:80
✅ 파드 삭제
kubectl delete pod nginx-pod
✅ 파드 디버깅
- 파드 세부 정보 조회하기
kubectl describe pods nginx-pod
- 파드 로그 확인하기
kubectl logs nginx-pod
- 파드 내부로 접속하기
kubectl exec -it nginx-pod -- bash
kubectl exec -it nginx-pod -- sh
서비스(Service) 관련 명령어
✅ 서비스 조회
kubectl get service
✅ 서비스 삭제
kubectl delete service spring-service
공통 명령어
✅ 매니페스트 파일에 적혀져있는 리소스(파드 등) 생성 및 변경사항 적용
kubectl apply -f nginx-pod.yaml
✅ 리소스 삭제
kubectl delete all --all