Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)
In kubernetes, when we create service we mention replica so those many container always run on nodes.
Is there any option of scale up or down as per usage. Like in AWS we can do autoscaling in EC2. In same way any autoscaling on container or pods.

1 Answer

0 votes
by (50.2k points)
edited by

Yes, you can scale the pods in kubernetes, For that, you need to set up a cluster with auto-scaling on.

For auto-scaling configuration, create a script file with the following commands and start the cluster along with this script file.

export NUM\_NODES=2

export KUBE\-AUTOSCALER\_MIN\_NODES=2

export KUBE\_AUTOSCALER\_MAX\_NODES=5

export KUBE\_ENABLE\_CLUSTER\_AUTOSCALER=TRUE

Then if the load increases then it will scale the pods up to 5 pods.

For more information, refer to kubernetes training.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...