Difference between revisions of "Kubectl scale deployment"

From wikieduonline
Jump to navigation Jump to search
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  [[kubectl scale]] deployment
+
{{lowercase}}
 +
  [[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]]
  
* [[hpa]]
+
== Related ==
 +
* [[Horizontal Pod Autoscaler (HPA)]]
 +
* <code>[[kubectl get deployments]]</code>
 +
* <code>[[kubectl describe deployment]]</code>
 +
* [[Liveness]], [[Readiness]]
 +
* <code>[[kubectl drain]]</code>
 +
* <code>[[kubectl autoscale]]</code>
 +
* <code>[[kubectl rollout restart deployment]]</code>
 +
* [[CKA: Know how to scale applications]]
 +
* [[aws ecs update-service --foce-new-deployment]]
  
 
== See also ==
 
== See also ==
* {{kubectl}}
+
* {{kubectl scale}}
 +
* {{Kubernetes deployments}}
 +
* {{Kubernetes Workloads}}
  
[[Category:K8s]]
+
[[Category:Kubernetes]]

Latest revision as of 07:15, 27 August 2024

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

Restart containers in a deployment[edit]

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[edit]

See also[edit]

Advertising: