kubectl
kubectl talks to the API server of a 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 nameselects where the command runs.
Learn it #
Use the kubectl cheat sheet and see it in action in Installing the Kubernetes Dashboard.