Add a Kubernetes Cluster Context

November 23, 2024 note-to-self k8s

This is for my own understanding. Please don't assume it is 100% correct.

Each cluster provider will have some sort of kubeconfig command so you can add a context locally, for whatever cluster.

Here are the two I currently know about:

AWS EKS

aws eks --region us-east-1 update-kubeconfig --name cluster_name

KinD

kind export kubeconfig --name cluster_name

Each will update the ~/.kube/config file with a new entry.

AWS documentation on update-kubeconfig

Kind documentation on export kubeconfig