kubectl

· 1 min read · Containers and Orchestration · Tool

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 name selects where the command runs.

Learn it #

Use the kubectl cheat sheet and see it in action in Installing the Kubernetes Dashboard.

More tutorials that use kubectl

#Kubernetes #Kubectl