[k8s] 필수 명령어
·
DevOps_k8s
--dry-run: 리소스 즉시 생성 --dry-run=client: 커맨드 테스트 -> 리소스가 생성되지 않음. -o yaml: 리소스 정의를 YAML 파일 형식으로 생성해준다. $ kubectl run nginx --image=nginx --dry-run=client -o yaml > nginx-pod.yaml => 리다이렉션으로 nginx-pod.yaml 파일을 생성할 수 있고, 해당 파일을 수정 및 리소스를 추가하여 업데이트 할 수 있다. 예제: # POD Create an NGINX Pod $ kubectl run nginx --image=nginx Generate POD Manifest YAML file (-o yaml). Don't create it(--dry-run) $ kubectl ru..