5 - Deployments Flashcards
What is a deployment?
Ability to update applications continuously without generating unavailability for users.
What is the definition of the deployment configuration file?
apiVersion: apps/v1 kind: Deployment metadata: name: rs-myapp labels: tier: production spec: template: metadata: name: nginx labels: tier: production spec: containers: - name: nginx image: nginx replicas: 6 selector: matchLabels: tier: production
What command can I use to check the status of all objects running on Kubernetes?
kubectl get all
What command can I use to check the status of only deployments?
kubectl get deployments
How can I check the status of a rollout?
kubectl rollout status deployment/deploy_name
How can I check the history of a deployment?
kubectl rollout history deployment/deploy_name
How many types of deployment strategy are there in kubernetes?
recreate -> First it destroys all pods and then recreates them with the new version. This generates a short period of downtime.
rolling update ->Disabling pods with older versions is done one by one. Deactivate an old one and activate a new one, until all deployment pods are completed.
How is a deployment updated?
kubectl apply -f arquivo.yaml
How can I make a change to the version of the image used in a deployment without changing the configuration file?
kubectl set image deployment/deploy_name nginx=nginx:1.9.1