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 <pod> not found
kubectl scale deployment <pod> --replicas=4
You to pass the deployment name which you want to scale
kubectl scale deployment <deployment name> --replicas=4
POD name wont work.
kubectl scale deployment/nginx-deployment --replicas=10
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