Application Lifecycle Management Flashcards

1
Q

What is the command to see the rollout status?

A

k rollout status deployment/<deployment_name></deployment_name>

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

What is the command to see the revisions of the deployment

A

k rollout history deployment/<deployment_name></deployment_name>

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

What is the major disadvantage of the Recreate deployment strategy?

A

The application will be down for some amount of time

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

What does the Rolling Update Deployment Strategy do?

A

The new version is deployed in between taking down a previous version, ensuring the application is always up

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

What command updates a deployment after the manifest has been modified?

A

k apply -f <deployment_manifest>.yaml</deployment_manifest>

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

What is the imperative command to update the image for a deployment?

A

k set image deployment/<deployment_name> \ nginx=nginx:1.9.1</deployment_name>

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

What is the command to rollback a deployment?

A

k rollout undo deployment/<deployment_name></deployment_name>

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

How do define a command argument to an image in a manifest?

A

Add the args parameter under spec. eg.

spec:
containers:
- name: ubuntu-sleeper
image: ubuntu-sleeper
args: [“10”]

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

How do define a docker style entrypoint in a manifest?

A

Add the command parameter under spec. eg.

spec:
containers:
- name: ubuntu-sleeper
image: ubuntu-sleeper
command: [“sleep2.0”]
args: [“10”]

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

How do you set arguments when running a pod from an imperative command?

A

k run <name> --image=<image_name> -- <arg1> <arg2></arg2></arg1></image_name></name>

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

How do you set environment variables in a manifest?

A

Use the env parameter under the spec section. Environment variables should be in an array. eg.

spec:
containers:

env:
- name:
value:

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

What is the purpose of a config map?

A

Config maps are used to pass configuration data in the form of key value pairs in Kubernetes.

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

What is the imperative command to create a configmap?

A

k create configmap \
app-config – from-literal=APP_COLOR=blue

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

What is the imperative command to create a configmap from a file?

A

k create configmap \
<config-name> --from-file=<path-to-file></path-to-file></config-name>

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

How do you create a declarative configmap?

A

apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
data:
APP_COLOR: blue
APP_MODE: prod

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

What is the command to list configmaps?

A

k get configmaps

17
Q

What is the command to describe a configmap?

A

k describe configmaps

18
Q

How do you specify a configmap in a manifest?

A

Under the spec section in container definition, add an envFrom. eg.

spec:

19
Q

What is the command to replace an existing pod from a file (generally done when editing is not allowed)?

A

k replace –force -f <filename>.yaml</filename>

20
Q

How do you imperatively create a secret?

A

k create secret <secret_name> \
app-secret --from-literal=DB_Host=mysql</secret_name>

21
Q

How do you imperatively create a secret and specify a file to read from?

A

k create secret <secret_name> \
app-secret --from-file=<name>.properties</name></secret_name>

22
Q

What kind value denotes a secret?

A

Secret

23
Q

What is the command to encode secrets in base64?

A

echo -n ‘<value>' | base64</value>

24
Q

What is the command to decode secrets in base64?

A

echo -n ‘<value>' | base64 --decode</value>

25
Q

How do specify a pod to use a secret in a manifest as an env variable?

A

spec:
containers:

:
- secretRef:
name: app-secret

26
Q

How do specify a pod to use a secret in a manifest as a single env variable?

A

spec:
containers:

env:
- name: DB_Password
valueFrom:
secretKeyRef:
name: app-secret
key: DB_Password

27
Q

How do you inject a secret as a file in a volume?

A

volumes:
- name: <app-secret-volume>
secret:
secretName: <app-secret></app-secret></app-secret-volume>

28
Q

What happens when you use a secret with multiple variables in a volume?

A

A file for each secret will be injected into the volume

29
Q

Are secrets encrypted?

A

No, they are only encoded

30
Q

Are secrets encrypted in ETCD?

A

No, but you can encrypt at rest

31
Q

Why is a container spec an array?

A

An array gives you the ability to add multiple containers to a manifest