Difference between revisions of "Kubectl scale deployment"
Jump to navigation
Jump to search
(28 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
− | [[kubectl scale]] deployment | + | [[kubectl scale]] [[deployment]] |
− | 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 == | |
+ | * [[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: | + | [[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]
- Horizontal Pod Autoscaler (HPA)
kubectl get deployments
kubectl describe deployment
- Liveness, Readiness
kubectl drain
kubectl autoscale
kubectl rollout restart deployment
- CKA: Know how to scale applications
- aws ecs update-service --foce-new-deployment
See also[edit]
kubectl scale
: [deployment | sts | --help
], HPA- Kubernetes deployments, strategies:
kind: Deployment
, Strategies:Recreate
orRollingUpdate
,kubectl
[create | describe | get | scale | rollout | deployment/
], Kubernetes Canary Deployments,deployment.kubernetes.io
- Kubernetes Workloads:
Deployment
,ReplicaSet, StatefulSet, DaemonSets, Job, CronJob
,.apps/
Advertising: