Exam4Training

Create a nginx pod with label env=test in engineering namespace See the solution below.

Create a nginx pod with label env=test in engineering namespace See the solution below.
A . Solution:
kubectl run nginx –image=nginx –restart=Never –labels=env=test –namespace=engineering –dry- run -o yaml > nginx-pod.yaml
kubectl run nginx –image=nginx –restart=Never –labels=env=test –namespace=engineering –dry- run -o yaml |
kubectl create -n engineering -f –
YAML File:

apiVersion: v1
kind: Pod
metadata:
name: nginx
namespace: engineering
labels:
env: test
spec:
containers:
– name: nginx
image: nginx

imagePullPolicy: IfNotPresent
restartPolicy: Never

kubectl create -f nginx-pod.yaml

Answer: A

Latest CKA Dumps Valid Version with 122 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version