Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with kubernetes client: stat /home/ec2-user/.kube/config: no such file or directory #16

Closed
hydeenoble opened this issue Feb 17, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@hydeenoble
Copy link

I am trying to run the aws-ssm with docker:

sudo docker run --env KUBE_CONFIG=~/.kube/config --env MASTER_URL=<API server endpoint from EKS> cmattoon/aws-ssm

and I keep getting

level=fatal msg="Error with kubernetes client: stat /home/ec2-user/.kube/config: no such file or directory

even when I am sure ~/.kube/config exist.

am i missing something?

@cmattoon
Copy link
Owner

KUBE_CONFIG should be the path inside the container (which you'll have to mount/provide as a secret/configmap)

Can you try:

sudo docker run \
    -v "/home/ec2-user/.kube/config:/mnt/.kube/config" \
    --env KUBE_CONFIG=/mnt/.kube/config \
    --env MASTER_URL=<API server endpoint from EKS> \
    cmattoon/aws-ssm

@hydeenoble
Copy link
Author

Thank you very much @cmattoon, It worked. But, I now have a new error message:

Error retrieving secrets: Get <API server endpoint from EKS>/api/v1/secrets: getting credentials: exec: exec: \"heptio-authenticator-aws\": executable file not found in $PATH"

Can you help??

@hydeenoble
Copy link
Author

@cmattoon, Please, can I get help here?

@cmattoon
Copy link
Owner

The error thrown is exec: exec: \"heptio-authenticator-aws\": executable file not found in $PATH, so I'm assuming you'll need to either:
a) fork and build a container with heptio-authenticator-aws; or
b) Update the .kube/config for this container to authenticate some other way

I'll look into supporting https://github.com/kubernetes-sigs/aws-iam-authenticator

@dawidmalina
Copy link

For EKS support 👍

@cmattoon cmattoon added the enhancement New feature or request label Feb 27, 2019
@cmattoon
Copy link
Owner

It should work now (after re-pulling latest)

@cmattoon cmattoon closed this as completed Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants