Question
Create a pod called delta-pod in defence namespace belonging to the development environment (env=dev) and frontend tier (tier=front) with image nginx:1.17
Answer
Get all namespaces:
kubectl get ns
we can see that the defence namespace is not presentkubectl create ns defence
Create the pod
kubectl -n defence run delta-pod --image=nginx:1.17 --labels env=dev,tier=front
Verify:
kubectl -n defence get po --show-labels
kubectl -n defence describe po delta-pod | grep -i image