k8s commands Flashcards

1
Q

run a pod

A

kubectl run [pod name] - -image=[image name]

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

exec into a container

A

kubectl exec -it [pod name] bash

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

run a command inside a pod without login into the pod

A

kubectl exec [pod name] - - [command]

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

delete a pod

A

kubectl delete pod [pod name]

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

how many ways can you configure a k8s object?

A
  • Through kubectl command line
  • through a configuration file in YAML
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

benefits configuring k8s objects using yaml file

A
  • changes can be tracked
  • Tells you what is live withing the cluster
  • easier to troubleshoot changes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly