A context in kubernetes is used to group access parameters under a convenient name. Each context has three parameters: cluster, namespace, and user. By default, the kubectl command-line tool uses parameters from the current context to communicate with the cluster.
In this article, we will learn how to use kubectl to manage the cluster contexts and access the different clusters.
To list all the cluster contexts:
1 2 3
$ kubectl config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE * arn:aws:eks:us-west-2:xxxxxx:cluster/cluster-1 arn:aws:eks:us-west-2:xxxxxx:cluster/cluster-1 arn:aws:eks:us-west-2:xxxxxx:cluster/cluster-1