Valid CKA Dumps shared by ExamDiscuss.com for Helping Passing CKA Exam! ExamDiscuss.com now offer the newest CKA exam dumps , the ExamDiscuss.com CKA exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com CKA dumps with Test Engine here:
Access CKA Dumps Premium Version (85 Q&As Dumps, 35%OFF Special Discount Code: freecram )
Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with env=dev and verify the same.
Correct Answer:
See the solution below. Explanation kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=prod nginx-prod --dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like "creationTimestamp: null" "dnsPolicy: ClusterFirst" vim nginx-prod-pod.yaml apiVersion: v1 kind: Pod metadata: labels: env: prod name: nginx-prod spec: containers: - image: nginx name: nginx-prod restartPolicy: Always # kubectl create -f nginx-prod-pod.yaml kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=dev nginx-dev --dry-run -o yaml > nginx-dev-pod.yaml apiVersion: v1 kind: Pod metadata: labels: env: dev name: nginx-dev spec: containers: - image: nginx name: nginx-dev restartPolicy: Always # kubectl create -f nginx-prod-dev.yaml Verify : kubectl get po --show-labels kubectl get po -l env=prod kubectl get po -l env=dev