k8s commands Flashcards
1
Q
run a pod
A
kubectl run [pod name] - -image=[image name]
2
Q
exec into a container
A
kubectl exec -it [pod name] bash
3
Q
run a command inside a pod without login into the pod
A
kubectl exec [pod name] - - [command]
4
Q
delete a pod
A
kubectl delete pod [pod name]
5
Q
how many ways can you configure a k8s object?
A
- Through kubectl command line
- through a configuration file in YAML
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.