Horizontal Pod autoscaling
HorizontalPodAutoscaler
is a Kubernetes resource that helps you to update the replicas within your ReplicaSet
resources based on defined factors, the most common being CPU and memory.
To understand this better, let's create an nginx
deployment, and this time we will set the resource limits within the Pod
. Resource limits are a vital element that enable HorizontalPodAutoscaler
resource to function. It relies on the percentage utilization of the limits to decide when to spin up a new replica. We will use the following nginx-autoscale-deployment.yaml
manifest for this exercise:
apiVersion: apps/v1 kind: Deployment metadata:   name: nginx   labels:     app: nginx spec:   replicas: 1   selector:     matchLabels:       app: nginx   template:     metadata:       labels:   &...