Kubernetes scheduling usually doesn’t need much help in order to determine which node to run a pod on. However, you may occasionally wish to have a little more control. In this lab, you will be able to practice the process of ensuring a pod runs on a specific node.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Configure the `auth-gateway` Pod to Only Run on `k8s-worker2`
Locate the
auth-gateway
pod in thebeebox-auth
namespace. Modify the pod, using a label and anodeSelector
constraint, so it will always be scheduled onk8s-worker2
. You will need to delete and re-create the pod in order for these changes to take effect.You can find a YAML descriptor for this pod at
/home/cloud_user/auth-gateway.yml
.- Configure the `auth-data` Deployment’s Replica Pods to Only Run on `k8s-worker2`
You will find the
auth-data
deployment in thebeebox-auth
namespace. Modify the deployment, using anodeSelector
constraint, so its replica pods will always run onk8s-worker2
. These changes should take effect once you make this change via a rolling deployment.You can find a YAML descriptor for this pod at
/home/cloud_user/auth-data.yml
.