Linux Foundation CKA Exam - Topic 4 Question 76 Discussion
Create a nginx pod with label env=test in engineering namespace
A) Explanation:
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
Tijuana
10 months agoPrecious
10 months agoAugustine
10 months agoTammara
10 months agoCordie
11 months agoMilly
11 months agoDelmy
11 months agoLorrine
11 months agoMeaghan
11 months agoShala
11 months agoEdgar
11 months agoCoral
11 months agoJesusita
12 months agoMurray
2 years agoHortencia
2 years agoMignon
2 years agoJesse
2 years agoTomas
2 years agoOcie
2 years agoFletcher
2 years agoJoni
2 years agoFrancoise
2 years agoDelsie
2 years agoJaney
2 years agoAlysa
2 years agoAltha
2 years agoFletcher
2 years agoTula
2 years agoWade
2 years agoRosalia
2 years agoDevon
2 years agoRickie
2 years ago