Kubernetes Deployment Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>
kubectl get deployment <deployment-name>
kubectl get deployment <deployment-name>
</syntaxhighlight>
==Get All Deployments from a Namespace==
<syntaxhighlight lang='bash'>
kubectl -n <namespace> get deployments
</syntaxhighlight>
</syntaxhighlight>



Revision as of 20:19, 2 July 2020

Internal

Getting a Deployment

kubectl get deployment <deployment-name>

Get All Deployments from a Namespace

kubectl -n <namespace> get deployments

Creating Deployments

Updating Deployments

kubectl get deployment ... -o yaml → modify → kubectl apply -f

Scaling Up and Down

kubectl scale --replicas=0 deployment <my-deployment>
kubectl scale --replicas=2 deployment <my-deployment>