Autoscale a Deployment on CPU
Traffic to dispatcher in namespace orders doubles every weekday afternoon, and someone has been scaling it by hand. Let Kubernetes do it.
dispatcher in namespace orders that scales Deployment dispatcher.3 and 10 replicas and targets an average CPU utilization of 60%.app container of dispatcher requests 250m CPU, so that utilization can be computed.invoice-pdf that already exists in the namespace is not changed.A practice cluster is running on this machine: start with kubectl get deploy,hpa -n orders.
About this machine
Ubuntu 24.04 with a private practice cluster: a real Kubernetes API server, scheduler and controllers, and three nodes (controlplane, node01, node02). Containers are simulated, so images never download and kubectl logs/exec are not available. k is an alias for kubectl, with completion. The grader checks the cluster's final state, not the commands you typed.
Your machine is ready to start
Create a free account to open a machine and get graded.