Home > Blockchain >  How can I increase the number of pods in kubernetes
How can I increase the number of pods in kubernetes

Time:12-01

I want to increase the number of pods in kubernetes for which I'm trying with the following commands but which gives an error Error from server (NotFound): deployments.apps not found

kubectl scale deployment <pod> --replicas=4

CodePudding user response:

You to pass the deployment name which you want to scale

kubectl scale deployment <deployment name>  --replicas=4

POD name wont work.

Read more here/Example

kubectl scale deployment/nginx-deployment --replicas=10

CodePudding user response:

You can increase/decrease the number of Pods in a deployment using:

# To kill all pods in a deployment
kubectl scale deploy <deployment-name> --replicas=0

# To set the number of pods
kubectl scale deploy <deployment-name> --replicas=3
  • Related