pod-design Flashcards

1
Q

Imperative command to update pod “nginx2”’s “app” label value to from “v1” to “v2”?

A

k label po nginx2 app=v2 –overwrite

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

Find pods with label “app=v1” and add assign additional label “tier=fe”

A

k label pods -l app=v1 tier=fe

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

Find pods with label “app=v1”, and show a table for them that includes the custom label “tier”.

A

k get pods -l app=v1 -L tier

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

For pods that have the label “app”, remove the that label.

A

k label po -l app app-

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

Assign label “foo=bar” to a node.

A

k label nodes minikube foo=bar

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

Remove the label “foo” from all nodes that have it.

A

k label nodes -l foo foo-

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

Create an nginx deployment with 2 replicas and open port 80

A

k create deployment nginx –image=nginx:1.18.0 –replicas=2 –port=80

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

Check the status of the rollout of deploy nginx.

A

k rollout status deployment nginx

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

How to rollback to a particular rollout?

A

k rollout undo deploy nginx –to-revision=4

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

Check the details of the 6th deployment revision.

A

k rollout history deployment nginx –revision=6

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

Scale a deployment to 5 replicas.

A

k scale deploy nginx –replicas=5

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

Autoscale a deployment to 80% CPU, min 5 and max 10

A

k autoscale deployment nginx –cpu-percent=80 –min=5 –max=10

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

How to pause the rollout of a deployment

A

k rollout pause deployment nginx

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