From the course: Deploying Scalable Machine Learning for Data Science
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Autoscaling a Kubernetes cluster
From the course: Deploying Scalable Machine Learning for Data Science
Autoscaling a Kubernetes cluster
- [Instructor] Kubernetes Clusters are designed to allocate resources as needed by different services. The autoscale command is a simple way to specify parameters to control automatic scaling. The autoscale command is a kube control command, specifically, kube control autoscale deployment ml-deployment is the first part of a command to autoscale a deployment that's called ml-deployment. Now we also need to specify CPU percentage, so we'll add that to the command. If the average of all pod CPU utilizations exceeds this threshold, then additional pods will be incorporated into the deployment. Now in this case, we're specifying a threshold of 80% CPU utilization. We can also specify a minimum and a maximum number of pods in a deployment by using the min and max parameters. In this case, we're specifying a minimum of two and a maximum of five. Kubernetes provides other metrics besides CPU utilization for the basis for scaling. For further details, review the Kubernetes documentation.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.