How to configure local kubectl to connect to kubernetes EKS cluster
Asked Answered
L

3

10

I am very new at kubernetes.

I have created a cluster setup at AWS EKS

Now I want to configure kubectl at a local ubuntu server so that I can connect at AWS EKS cluster.

Need to understand the process. [ If at all it is possible ]

Laggard answered 21/2, 2020 at 8:39 Comment(0)
U
8

aws cli is used to create Kubernetes config (normally ~/.kube/config).

See details by: aws eks update-kubeconfig help

Unholy answered 21/2, 2020 at 11:23 Comment(0)
C
4

You can follow this guide. You need to do following steps.

1.Installing kubectl

2.Installing aws-iam-authenticator

3.Create a kubeconfig for Amazon EKS

4.Managing Users or IAM Roles for your Cluster

Also take a look at configuring kubeconfig using AWS CLI here

Cripps answered 21/2, 2020 at 8:47 Comment(1)
Thanks a lot .. missed the documentation .. done nowLaggard
L
1

You can use aws eks update-kubeconfig command. However, you may need to update mapUsers on configMap/aws-auth for mapping userarn and Kubernetes roles.

kubectl edit -n kube-system configmap/aws-auth

aws eks update-kubeconfig --name <Clustername> --region=us-central-1 --profile <aws profile>
Lenee answered 26/1 at 20:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.