Topic 1 Β· Question 21

SIMULATION - Task - Schedule a pod as follows: β’ Name: nginx-kusc00401 β’ Image: nginx β’ Node selector: disk=spinning


Reveal solution & explanationHide answer
Suggested solution
kubectl run nginx-kusc00401 --image=nginx --dry-run=client -o yaml > pod.yaml
# Add under spec: nodeSelector: {disk: spinning}
kubectl apply -f pod.yamlnodeSelector restricts the Pod to a node carrying the disk=spinning label.



