EKS
You can use Granted as a kubectl
credential plugin to authenticate to EKS clusters. kubectl
uses a “kubeconfig” file, which is located at ~/.kube/config
by default. To use Granted with EKS, we’ll modify this kubeconfig file.
First, add an entry for your cluster to the kubeconfig file by running
Where <CLUSTER_NAME>
is the name of the EKS cluster you’re trying to connect to. This command will add an entry to your kubeconfig file similar to the below:
Now, modify the exec
field of this entry to be the following:
Where <PROFILE_NAME>
is the name of the AWS profile to use, <CLUSTER_REGION>
is the region the EKS cluster is deployed to, and <CLUSTER_NAME>
is the name of the EKS cluster.
Now, run a kubectl
command against the cluster to verify the connection:
The command should print the list of nodes for your cluster.