Command Line Cheat Sheet
List of kubectl commands for configuring and troubleshooting issues pertaining to KUBE+
in-cluster components.
| S. No. | Command | Purpose |
|---|---|---|
| 1 |
|
lists resources (pods, services, deployments, etc.) in all namespaces. |
| 2 |
|
Retrieves information about a specific namespace in a Kubernetes cluster. |
| 3 |
|
Deletes a specific namespace and all the resources contained within it in a Kubernetes cluster. |
| 4 |
|
List all the pods in the current Kubernetes namespace. |
| 5 |
|
lists all the pods in a specific namespace in a Kubernetes cluster. Replace "[namespace_name]" with the actual name of the namespace you want to target. This command displays information about the pods in that namespace |
| 6 |
|
Deletes a specific pod in a Kubernetes cluster. |
| 7 |
|
Lists all the secrets available in the current Kubernetes namespace. |
| 8 |
|
Displays detailed information about a specific secret in a Kubernetes cluster. |
| 9 |
|
Deletes a specific secret in a Kubernetes cluster. |
| 10 |
|
Applies a configuration to an object by filename or stdin. |
| 11 |
|
Prints the logs for a pod and it will continuously stream the logs as new log entries that are generated in real-time. This is useful for monitoring and troubleshooting applications running in Kubernetes pods.. |
| 12 |
|
Prints the logs from a specific container within a pod in a Kubernetes cluster. |
| 13 |
|
Redirects and saves the logs from a specific pod in a Kubernetes cluster to a file named ‘pod.log’. |