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.




