kubeconfig
The file that tells kubectl which clusters exist, which credentials to use, and which pairing of the two is currently selected.
It usually contains credentials, and a wrong current context sends commands to the wrong cluster.
In more detail
It holds three lists, clusters, users and contexts, plus a current-context pointer. The KUBECONFIG environment variable can point at a different file, or several separated by colons. Keeping a practice cluster in a kubeconfig of its own means no command can reach a cluster at work by accident.
Example
export KUBECONFIG=${TMPDIR:-/tmp}/kube-course.confRelated terms
- kubectl — The command-line tool for talking to a Kubernetes cluster's API server: creating, reading, changing and deleting objects.
- kubeconfig context — A named pairing in a kubeconfig of one cluster, one user and an optional default namespace; the current context decides where kubectl goes.
- kind — A tool that builds a throwaway Kubernetes cluster on your computer, with each node running as a Docker container.
Taught in
- Contexts, Namespaces And One-Line Answers — Certified Kubernetes Administrator (CKA) Exam Prep
- Node NotReady: Kubelet, Runtime And Certificates — Certified Kubernetes Administrator (CKA) Exam Prep
- When A Control Plane Pod Breaks — Certified Kubernetes Administrator (CKA) Exam Prep
- RBAC: From Everything To Exactly Enough — Certified Kubernetes Administrator (CKA) Exam Prep
- Preparing A Node Before kubeadm Will Touch It — Certified Kubernetes Administrator (CKA) Exam Prep
- kubeadm init And join: What Lands Where — Certified Kubernetes Administrator (CKA) Exam Prep
- Upgrades In The Only Order That Works — Certified Kubernetes Administrator (CKA) Exam Prep
- HA Control Planes: Quorum, Stacked Or External — Certified Kubernetes Administrator (CKA) Exam Prep
- Authentication, Authorisation And Admission — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Allowed Registries: Admission That Refuses Images — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Detection Review: Which Signal Catches It? — Certified Kubernetes Security Specialist (CKS) Exam Prep
- GKE Clusters And A First Deploy — Google Cloud Associate Cloud Engineer Exam Prep
- Running GKE — Google Cloud Associate Cloud Engineer Exam Prep
- The gcloud And Product-Name Sprint — Google Cloud Associate Cloud Engineer Exam Prep
- CI/CD Variables: Where Values Come From, And Which One Wins — GitLab Certified CI/CD Associate Exam Prep
- Pending All Saturday: How The Scheduler Places Pods — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Wrong Cluster, Wrong Version: Contexts, Upgrades And Skew — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- One Leaked Kubeconfig: How Far Does It Go? — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Open To Every Interface: Controller Manager And Scheduler — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Copied From A Blog Post: The Kubelet — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- A Copy Of The Backup: etcd — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Port 30080 On Every Node: kube-proxy, Networking And Clients — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Component Sprint: The Reference Build — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- One Pod Away: Network Attackers And Sensitive Data — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Threat Model Sprint: Name It, Then Stop It — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Audit Day: Final Review — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Bootstrap A Local Cluster And Check Your Context — Kubernetes: Production-Grade Container Orchestration
References
Certification courses
- CKA course and practice exam: Certified Kubernetes Administrator
- CKAD course and practice exam: Certified Kubernetes Application Developer
- CKS course and practice exam: Certified Kubernetes Security Specialist
- Google Associate Cloud Engineer course and practice exam: Google Cloud certification
- GitLab CI/CD Associate course and practice exam: GitLab Certified CI/CD Associate
- KCNA course and practice exam: Kubernetes and Cloud Native Associate
- KCSA course and practice exam: Kubernetes and Cloud Native Security Associate