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

Latest versions are not working #7

Closed
MZohaibAsaad opened this issue Aug 18, 2020 · 8 comments
Closed

Latest versions are not working #7

MZohaibAsaad opened this issue Aug 18, 2020 · 8 comments

Comments

@MZohaibAsaad
Copy link

Hello.
I was using this image in gitlab pipelines and it broke two days ago. It gives me error when i'm trying to connect to k8s cluster.
Command i ran:
kubectl apply --kubeconfig=kubeconfig.yaml --filename https://github.com/knative/serving/releases/download/v0.14.0/serving-crds.yaml
Error i got:
unable to recognize "https://github.com/knative/serving/releases/download/v0.14.0/serving-crds.yaml": Get https://server.region.eks.amazonaws.com/api?timeout=32s: getting credentials: exec: fork/exec /usr/bin/aws-iam-authenticator: exec format error

And strange thing is that i tried to replicate the issue on local machine by ssh into local docker image and running above command but it ran just fine inside local docker image, but same thing fails in pipeline.

@ozbillwang
Copy link
Collaborator

ozbillwang commented Aug 18, 2020

seems you run something in AWS EKS, please check your setting in it. it blocked your external access to github.com.

Second, check if you can connect to kubernetes cluster:

kubectl get nodes
kubectl get all --all-namespaces

This is not the image problem, you need figure it out by yourself. Otherwise ask for help by search google or stackoverflow.

@thapakazi
Copy link

@ozbillwang This is a issue, I just execed inside the container
screenshot-20200818-14:08:52
and found iam-authenticator is broken.

It broke my CI :(

@ozbillwang ozbillwang reopened this Aug 18, 2020
@thapakazi
Copy link

Hey @ozbillwang, I think you could just rebuild it once again on travis, build.sh its working with new iam binary for me in local.

This job is weird though: https://travis-ci.org/github/alpine-docker/k8s/jobs/718664972

screenshot-20200818-15:36:27

I wonder why build.sh pulled this url: https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.9/2020-07-08/bin/linux/amd64/aws-iam-authenticator

@thapakazi
Copy link

thapakazi commented Aug 18, 2020

New build worked from me @ozbillwang 👍

Edit:
Just an idea 🤔 ; would be better if these tools be verified at the end of Dockerfile with simple version command like:
screenshot-20200818-15:50:47

@ozbillwang
Copy link
Collaborator

try now

@ozbillwang
Copy link
Collaborator

the aws-iam-auth url is coming from this document:

https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html

AWS doesn't share us the go through permission that we can't know what's the latest version from above url

https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.9/2020-08-04/bin/linux/amd64/aws-iam-authenticator

I used some scripts to catch the keyword about 1.17.9/2020-08-04, but seems aws developers are keep changing the html format. The build.sh is failed to get the latest version of "aws-iam-auth"

@thapakazi
Copy link

Hmm could be, I thought the same too, I was thinking of trying alternative, directly from github like:

latest_aws_iam_auth=$(curl https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/latest | sed -r 's/.*http.*v(.*)">.*/\1/')
AWS_IAM_AUTH_VERSION_URL=https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${latest_aws_iam_auth}/aws-iam-authenticator_${latest_aws_iam_auth}_linux_amd64

@ozbillwang
Copy link
Collaborator

I used to get the latest release from github, but I found they are different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants