Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up AWS EKS - Don't know username and password for config

I'm having an extremely hard time setting up EKS on AWS. I've followed this tutorial: https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#eks-launch-workers

I got up to the ~/.kube/config file and when I try to run kubectl get svc I'm prompted with the below.

▶ kubectl get svc
Please enter Username: Alex
Please enter Password: ********
Error from server (Forbidden): services is forbidden: User 
"system:anonymous" cannot list services in the namespace "default"

I'm unsure where to find the username and password for this entry. Please point me to the exact place where I can find this information.

I think this also has to do with EKS RBAC. I'm not sure how to get around this without having access to the server.

like image 262
Alex Miles Avatar asked Jul 13 '18 23:07

Alex Miles


People also ask

How do I resolve the your current user or role does not have access to Kubernetes objects on this EKS cluster error in Amazon EKS?

Your current user or role does not have access to Kubernetes objects on this EKS cluster This may be due to the current user or role not having Kubernetes RBAC permissions to describe cluster resources or not having an entry in the cluster's auth config map.

What is IAM authenticator for EKS?

Amazon EKS uses IAM to provide authentication to your Kubernetes cluster through the AWS IAM authenticator for Kubernetes. You can configure the stock kubectl client to work with Amazon EKS by installing the AWS IAM authenticator for Kubernetes and modifying your kubectl configuration file to use it for authentication.


1 Answers

This issue occurs if your user configuration isn't working in your kubeconfig, or if you are on a version of kubectl less than v1.10

like image 182
monokrome Avatar answered Oct 12 '22 01:10

monokrome