In this training course, we will show how the Kubernetes Scheduler tries to keep things away from each other.
Navigate to the lab folder:
cd /workspaces/kubernetes-fundamentals/20_scheduling-affinity
cat water-pod.yaml
kubectl create -f water-pod.yaml
cat fire-deployment.yaml
kubectl create -f fire-deployment.yaml
Pods
fire
must not be on the same node as the podwater
.
kubectl get pods -o=custom-columns='POD_NAME:metadata.name,NODE_NAME:spec.nodeName'
kubectl delete pod water
kubectl delete deployment fire