Auto Scale Config
Click the following menu Auto Scale Config.
Click Create button, a popup window will be showed.
- Select the service that you want to setup the auto scale criteria, like here select dev-sample-nodejs,
- Then set Max Replicas, Target CPU. In the above configuration, when Target CPU approaches 30% usage ratio, a new pod (instance) will be created automatically by the Kubernetes.
From the following menu and UI to see how many nodes / replicas are running for each micro service.
Then we use postman to do stress testing.
Then after a while, you will see the Current CPU is over the target CPU, and the Desired Replicas is 3 which means 3 replicas will be created.
Soon 3 replicas for dev-sample-nodejs are running.
After the stress testing completed, the Current CPU is down to 0.
A few minutes later, the Current Replicas and Desired Replicas will down to 1, which means there is only 1 pod (instance) running.