Home > Enterprise >  Kubernetes Autoscaling using VPA - Off or Auto update mode?
Kubernetes Autoscaling using VPA - Off or Auto update mode?

Time:10-13

For the needs of a project i have created 2 Kubernetes clusters on GKE.

Cluster 1: 10 containers in one Pod

Cluster 2: 10 containers in 10 different Pods

All containers are connected and constitute an application.

What i would like to do is to generate some load and observe how the vpa will autoscale the containers..

Until now, using the "Auto" mode i have noticed that VPA changes values only once, at the begin and not while i generate load and that the Upper Bound is soo high, so it doesn't need any change!

Would you suggest me:

1) to use Auto or Recommendation mode?

and

2) to create 1 or 2 replicas of my application?

Also i would like to say that 2 of 10 containers is mysql and mongoDB . So if i have to create 2 replicas, i should use statefulsets or operators, right?

Thank you very much!!

CodePudding user response:

Not sure you mean it when you say this

Cluster 1: 10 containers in one Pod

Cluster 2: 10 containers in different Pods

At very first you are not following best practice, ideally, you should be keeping the single container in a single POD

Running 10 containers in one pod that too much, if there is interdependency your code should be using the K8s service name to connect to each other.

to create 1 or 2 replicas of my application?

Yes, that would be always better to run multiple replicas of the application so if due to anything even node goes down your POD on another node would be running.

Also i would like to say that 2 of 10 containers is mysql and mongoDB . So if i have to create 2 replicas, i should use statefulsets or operators, right?

You can use the operators and stateful sets both no in it, it's possible operator idally create the stateful sets.

Implementing the replication of MySQL across the replicas would be hard manually unless you have good experience as DBA and you are aware.

While with operator you will get the benefit both auto backup, replication auto management and other such things.

Operators indirectly creates the stateful set or deployment but you won't have to manage much and worry about the replication and failover planning and DB strategy.

  • Related