Back to Glossary
Kubernetes

What is kubeconfig?

A YAML file storing cluster connection details, credentials, and contexts for kubectl.

A kubeconfig file (default: ~/.kube/config) tells kubectl how to connect to one or more Kubernetes clusters. It contains clusters (API server endpoint, CA cert), users (credentials: client cert, token, or exec plugin), and contexts (a named combination of cluster + user + namespace). Multiple kubeconfigs can be merged using the KUBECONFIG env variable. Tools like kubectx and kubens make switching contexts and namespaces faster.

Test your knowledge of kubeconfig and 130 other DevOps concepts