Skip to main content
In this lesson you’ll practice deploying an additional Kubernetes scheduler alongside the cluster’s default scheduler. Follow each step to inspect the running scheduler, create configuration and RBAC resources, deploy a second scheduler Pod, and verify a test Pod is scheduled by the new scheduler. Goal summary:
  • Inspect the default kube-scheduler Pod to determine the image in use.
  • Create a ConfigMap containing the scheduler configuration.
  • Deploy an additional scheduler Pod that uses the same scheduler image.
  • Create a test Pod that is scheduled by the new scheduler.

1) Inspect the default scheduler Pod and identify its image

First, list Pods in the kube-system namespace and locate the kube-scheduler Pod:
Identify the specific kube-scheduler Pod name from that list, then describe it to find the image in use. Example (replace the pod name if different in your cluster):
Example output (this shows the exact image string you should use for the custom scheduler):
Always use the exact image string shown by the running kube-scheduler (including the tag) when configuring your custom scheduler Pod (for example, k8s.gcr.io/kube-scheduler:v1.23.0). This ensures compatibility between scheduler binary and cluster components.

2) Verify service account / RBAC are present

The lab environment includes a service account and ClusterRoleBinding for the custom scheduler. Confirm the service account exists:
Expected output:
If you need to inspect or troubleshoot RBAC, list role bindings and cluster role bindings:
If the custom scheduler lacks the necessary RBAC (ClusterRole / ClusterRoleBinding), it will be unable to communicate with the API server and schedule Pods. Ensure the service account has appropriate permissions.

3) Create a ConfigMap for the scheduler configuration

A scheduler configuration file is provided at /root/my-scheduler-config.yaml. Create a ConfigMap named my-scheduler-config in the kube-system namespace from that file:
Verify the ConfigMap was created:
Expected output:
For reference, the scheduler configuration file might look like this:
This configuration sets a custom scheduler profile named my-scheduler. leaderElect: false is often used for single-instance scheduler testing; in production you typically enable leader election for HA setups.

4) Prepare the Pod manifest for the additional scheduler

A Pod manifest is provided at /root/my-scheduler.yaml. It contains the container command, liveness/readiness probes, the volume mount for the ConfigMap, and essential spec fields. Open the file and update the container image field to match the image discovered in step 1 (for example k8s.gcr.io/kube-scheduler:v1.23.0). Example snippet (ensure you replace the image: line with the exact image string found earlier):
Note: do not include any angle-bracket placeholders in the image field. Use the literal image tag from step 1.

5) Create the new scheduler Pod

Apply the manifest to create the Pod in the cluster:
Expected response:
Verify the new scheduler Pod appears and becomes ready in the kube-system namespace:
Example output showing the custom scheduler running:
If the Pod remains in CrashLoopBackOff or Pending, describe the Pod for diagnostics:
Look for probe failures, permission errors, or config file mounting issues.

6) Create a test Pod that uses the custom scheduler

A test Pod manifest is provided at /root/nginx-pod.yaml. By default it looks like:
To ensure this Pod is scheduled by your new scheduler, add the schedulerName field with the value my-scheduler:
Create the Pod:
Confirm the Pod is scheduled and running:
Example output when the Pod is running:
If the Pod is not scheduled, inspect it for events and errors:
In the Events section, look for scheduling attempts and any errors returned by my-scheduler. If no scheduling attempts are recorded, verify the custom scheduler Pod is running and communicating with the API server.
That completes the steps to add an additional scheduler to the cluster and schedule a Pod using it.

Watch Video