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)
2
Q
How do I get detailed information about a pod
A
$ k describe pods
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>
4
Q
How do I edit an existing pod
A
$ k get pod <pod-name> -o yaml > pod-definition.yaml</pod-name>