# Kubernetes Commands

The following lists some useful commands for getting information and debugging the system.

| Command                                                          | Description                                                                                                                                                                                                                                                          |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`kubectl cluster-info`**                                       | Prints information about the running **`Kubernetes`** cluster.                                                                                                                                                                                                       |
| **`kubectl -n <namespace> get all`**                             | <p>Lists all the Kubernetes cluster components running in the specified namespace; e.g.,</p><ul><li><strong><code>kubectl -n ess get all</code></strong></li></ul>                                                                                                   |
| **`kubectl -n describe <pod\|service>`**                         | <p>Describe the specified pod or service in the specified namespace; e.g.,</p><ul><li><strong><code>kubectl -n ess describe service/ess-webid</code></strong></li><li><strong><code>kubectl -n ess describe pod/ess-webid-589b779f47-4drwr</code></strong></li></ul> |
| **`kubectl -n <namespace> exec --stdin --tty <pod> -- /bin/sh`** | Run an interactive shell inside one of the pods.                                                                                                                                                                                                                     |
| **`kubectl run curl image=radial/busyboxplus:curl –i --tty`**    | Run a container in the cluster with **`curl`** installed to inspect the network.                                                                                                                                                                                     |

See also:

* <https://kubernetes.io/docs/reference/kubectl/cheatsheet/>
