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

Kompose username/password? #137

Closed
bkcummins opened this issue Aug 21, 2018 · 6 comments
Closed

Kompose username/password? #137

bkcummins opened this issue Aug 21, 2018 · 6 comments

Comments

@bkcummins
Copy link

bkcummins commented Aug 21, 2018

I'm working through our first Kubernetes deployment from a MacOS terminal into worker nodes managed by AWS EKS.

Everything in the AWS EKS documentation is working as explained; however, I was trying to deploy a docker-compose.yml using Kompose up and am asked for a Username and Password.

Any idea what I would use to create a Username and Password? Is this referring to a Kubernetes service account or would it be mapped to an IAM user account?

I tried to mapUsers to a IAM userarn, but I don't see what password would be used.
https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html

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

I was unable to satisfy it with an IAM user and console password.

Any help clarifying would get great appreciated.

Thx in advance!

@mumoshu
Copy link
Contributor

mumoshu commented Aug 21, 2018

@bkcummins Hey! Would you mind sharing us full log messages until you were asked for username and password?

I was wondering if kompose up would automatically build a docker image, and before deploying to to K8S, try to push it to your a docker registry? In case your registry requires authentication, you would have been asked for username and password for the docker registry.

@bkcummins
Copy link
Author

bkcummins commented Aug 22, 2018

@mumoshu They are private images. Our DTR is docker hub, but I am authenticated successfully there on the local terminal. Is there an additional step I missed to link the DTR to EKS? Oh, btw....I got the same Username/Password request when attempting the Kompose docker-compose.yml tutorial (with public images).

To date, I’ve been deploying with docker-compose directly to single node EC2 docker machines. This all works fine from the local terminal.

With AWS EKS, I can deploy out to the cluster of worker nodes using the various tutorial apps without a problem.

Trying to spin up with Kompose is short. As I recall, the first line just said it was deploying then the second line asked for Username. Then the third asked for the Password. Nothing I tried worked so I figured there was an inconsistency in how Kompose authenticates with the Kubernetes cluster when using aws-Iam-authenticator. I can post those log results first thing in the morning (eastern USA).

Thx again!

@bkcummins
Copy link
Author

bkcummins commented Aug 22, 2018

@mumoshu Also, in this instance the images for these services are already built and published as public to a DTR. They're not spec'd to build in docker-compose.yml.

@mattlandis
Copy link
Contributor

I haven't used kompose myself, but I took a look at the source and it looks like they are using an old version of client-go. Since it doesn't have the new exec based auth provider that may be causing the issue.

I pulled down a copy of kubectl v1.4.1 and used it to try and get pods against a eks cluster. It prompts for username and password too.

They have an open issue to move to client-go for interactions. I've added a comment on that issue to also upgrade the version of client-go being used.

@bkcummins
Copy link
Author

@mattlandis thx so much for the explanation! we just moved on w/o kompose.

@RichardBronosky
Copy link

I had this issue too even though my kubectl calls were fine. Turns out that the root user did not have the access needed. so I copied the ~/.kube/config file to the root user's home.

sudo mkdir -p /root/.kube; sudo cp ~/.kube/config /root/.kube/
ip="$(ip route get 1 | awk 'NR==1{print $7}')"
sudo -H kompose up --server https://$ip:6443

And I am using sudo because my user can't access /var/run/docker.sock

joanayma pushed a commit to joanayma/aws-iam-authenticator that referenced this issue Aug 11, 2021
* allow creating an IAM role for each worker group

* moved change from 'changed' to 'added'

* create multiple roles not just profiles

* fix config_map_aws_auth generation

* don't duplicate worker-role templating

* specify ARNs for worker groups individually

todo fix aws_auth configmap

* fixed AWS auth

* fix aws_iam_instance_profile.workers name
fix iam_instance_profile fallback

* fix outputs

* fix iam_instance_profile calculation

* hopefully fix aws auth configmap generation

* manually fill out remainder of arn

* remove depends_on in worker_role_arns template file

this was causing resources to be recreated every time

* fmt

* fix typo, move iam_role_id default to defaults map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants