Kubernetes is a defacto tool for any enterprise application to manage containerized applications in production. I would like to share some important commands which I use daily work.
Context & Configurations
- To view configuration of the k8s
- To display list of contexts
- To display current context
- To set the default context to specific <my-cluster-name>
Viewing & Finding Services
- To display all the pods
- To get Pod's yaml file
- To display pod's yaml without cluster specific information
- Show labels for all pods (or any other K8s object that supports lebelling)
To Interact with Running Pods
- To display logs of a pod
- To display logs of pods with a specific label name
- To display logs of a container
- To stream pod logs
- To stream pod container logs
- To stream pod previous container logs
- To know complete details every pod
Post a Comment