Pods with YAML Flashcards

1
Q

What are the required fields in a YAML config file

A
  • apiVersion (v1 or apps/v1)
  • kind (Pod, ReplicaSet, Deployment)
  • metadata (data about the object: labels, name)
  • spec (data about the container)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do I get detailed information about a pod

A

$ k describe pods

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

How do I generate spec for running pod nginx and write it into a file

A

$ k run <pod-name> --image=<name> --dry-run=client -o yaml > <name>.yaml</name></name></pod-name>

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

How do I edit an existing pod

A

$ k get pod <pod-name> -o yaml > pod-definition.yaml</pod-name>

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