Computer Science/Kubernetes 정리
언제 딸지 모르겠지만 Kubernetes 자격증 팁!!
410leehs
2023. 2. 15. 16:23
Yaml 파일을 만들고 편집하는 것은 어려우니 'kubectl run' 커맨드를 활용해 Yaml template을 생성하는데 도움이 될 수 있습니다!
아래 커맨드들을 사용해 이전 기출문제들을 시도해보아요~(영어로 문제가 나오니까 번역하지 않고 그대로 씀!)
1) Create an NGINX POD
kubectl run nginx --image=nginx
2) Generate POD Manifest YAML file(-o yaml). (--dry-run) --> 이거는 생성하지 않고 실행되는지만 확인하는 명령어
kubectl run nginx --image=nginx --dry-run=client -o yaml
3) Create a deployment
kubectl create deployment --image=nginx nginx
4) Generate POD Manifest YAML file(-o yaml).
kubectl create deployment --image=nginx nginx --dry-run -o yaml > nginx-deployment.yaml