Kubernetes deployment

 Deployment


Similar to replicaset yaml file

Kind change to deployment


Deploy #kubectl create -f <yaml file> --record

Check #kubectl get deployments

Check #kubectl get all

Check #kubectl describe deployment

Example yaml file

https://github.com/tomshenhao/kubernetes-learning/blob/master/deployment.yml


No file create deployment #kubectl run <pod name> --image=<image name>

Example: kubectl run nginx --image=nginx


Deployment - update / rollback

Check #kubectl rollout status deployment/<deployment name>

Check #kubectl rollout history deployment/<deployment name>


Deployment strategy

1. Recreate

2. Rolling update - default


Update #kubectl apply -f <yaml file> 

Rollback #kubectl rollout undo deployment/<deployment name>

Nginx as example to test

https://github.com/tomshenhao/kubernetes-learning/blob/master/deployment_1.0.yml

https://github.com/tomshenhao/kubernetes-learning/blob/master/deployment_1.1.yml


Comments

Popular posts from this blog

Nginx Proxy & Load Balance & LNMP

Snort+barnyard2+Snorby CentOS 6.5_64 Installation

ORACLE Error