Module 2: Scheduling & Placement
ποΈ 1. The Manual Task: Capacity Planning
Without a scheduler, an SRE must manually decide where each application runs.
The Manual Steps:
- Check Resources: SSH into node-1 and check free memory (
free -m). - Assign Workload: Decide if the node has enough RAM.
- Run App: Pull the Docker image and run the container manually.
- Update Logs: Update a central inventory system (like an Excel sheet).
π 2. The Kubernetes Abstraction: kube-scheduler
The kube-scheduler automates this capacity planning using a two-step process:
- Filtering (Predicates): It filters out nodes that canβt run the Pod (e.g., node is out of memory).
- Scoring (Priorities): It ranks the remaining nodes (e.g., prefer nodes where the image is already pulled).
- NodeSelector: Allows you to steer workloads based on node labels (e.g., βonly run on nodes with GPUsβ).