Kubernetes Deployment Operations: Difference between revisions
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
* [[Kubernetes Operations]] | * [[Kubernetes Operations]] | ||
* [[Kubernetes Deployments#Operations|Deployments]] | * [[Kubernetes Deployments#Operations|Deployments]] | ||
=Getting a Deployment= | |||
<syntaxhighlight lang='bash'> | |||
kubectl get deployment <deployment-name> | |||
</syntaxhighlight> | |||
==Get All Deployments from a Namespace== | |||
<syntaxhighlight lang='bash'> | |||
kubectl -n <namespace> get deployments | |||
</syntaxhighlight> | |||
==Get All Deployments from All Namespaces== | |||
<syntaxhighlight lang='bash'> | |||
kubectl get -A deployments | |||
</syntaxhighlight> | |||
=Creating Deployments= | |||
==With CLI== | |||
<syntaxhighlight lang='bash'> | |||
kubectl -n <namespace> create deployment <name> --image=ovidiufeodorov/httpd | |||
</syntaxhighlight> | |||
=Updating Deployments= | =Updating Deployments= |
Latest revision as of 02:53, 5 September 2020
Internal
Getting a Deployment
kubectl get deployment <deployment-name>
Get All Deployments from a Namespace
kubectl -n <namespace> get deployments
Get All Deployments from All Namespaces
kubectl get -A deployments
Creating Deployments
With CLI
kubectl -n <namespace> create deployment <name> --image=ovidiufeodorov/httpd
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>