# kubectl

> kubectl is the command line client of Kubernetes: it sends requests to the API server to create, inspect, change and debug cluster resources.

- Source: https://www.itwonderlab.com/kubectl/
- Published: 2026-08-28
- Updated: 2026-08-28
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

**kubectl** talks to the API server of a [Kubernetes](https://www.itwonderlab.com/kubernetes/) cluster using the credentials in your `kubeconfig` file. Almost everything you do by hand in a cluster goes through it.

### Key concepts

- **Context**: a cluster, user and namespace saved in the kubeconfig. Switch with `kubectl config use-context`.
- **apply**: create or update resources from YAML (`kubectl apply -f`).
- **get, describe, logs, exec**: inspect and debug.
- **Namespaces**: `-n name` selects where the command runs.

### Learn it

Use the [kubectl cheat sheet](https://www.itwonderlab.com/kubectl-cheat-sheet/) and see it in action in [Installing the Kubernetes Dashboard](https://www.itwonderlab.com/installating-kubernetes-dashboard/).
