kubectl scale deployment

From wikieduonline
Revision as of 07:15, 27 August 2024 by Welcome (talk | contribs) (→‎Related)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

kubectl scale deployment
kubectl scale deployment your-deployment --replicas=0 -n service 

Restart containers in a deployment

kubectl scale deployment mygrafanadeployment --replicas=0
deployment.apps/grafana scaled

kubectl get deployments
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
grafana   0/0     0            0           29m

kubectl scale deployment mygrafanadeployment --replicas=1
deployment.apps/grafana scaled

kubectl get deployments
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
grafana   1/1     1            1           30m

kubectl describe pods
kubectl describe deployment grafana

Related

See also

Advertising: