5 - Deployments Flashcards

1
Q

What is a deployment?

A

Ability to update applications continuously without generating unavailability for users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the definition of the deployment configuration file?

A
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command can I use to check the status of all objects running on Kubernetes?

A

kubectl get all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command can I use to check the status of only deployments?

A

kubectl get deployments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can I check the status of a rollout?

A

kubectl rollout status deployment/deploy_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can I check the history of a deployment?

A

kubectl rollout history deployment/deploy_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How many types of deployment strategy are there in kubernetes?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is a deployment updated?

A

kubectl apply -f arquivo.yaml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can I make a change to the version of the image used in a deployment without changing the configuration file?

A

kubectl set image deployment/deploy_name nginx=nginx:1.9.1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly