rancher / rancher-ecr-credentials

Docker container to periodically update the Credentials for an AWS Elastic Container Registry in Rancher
Apache License 2.0
21 stars 9 forks source link

CrashLoopBackOff - When starting the container via Rancher2.0 UI #14

Open AmitDJagtap opened 6 years ago

AmitDJagtap commented 6 years ago

I am using this image to refresh my AWS ECR creds and K8 secret. I use rancher UI to deploy a workload via the UI. I have set the environment variables as follows -

And added labels as mentioned in repo readme.Add the following labels to the service in Rancher:

io.rancher.container.create_agent: true io.rancher.container.agent.role: environment

But the deployment is failing and crashes with following logs in the container. The logs are very generic and cannot tell what I am missing. Any help will be appreciated. INFO[2018-05-24T07:31:54Z] Starting ECR Credential Updater FATA[2018-05-24T07:31:54Z] Unable to create Rancher API client: Get: unsupported protocol scheme ""

falier-readytech commented 5 years ago

Same here. Did exactly the same steps and the same result... Tried different tags of the docker image but no luck.

aliazlan4 commented 4 years ago

I was getting the same issue. I resolved by the following procedure:

  1. Remove two labels from the container.
  2. Create Rancher API access key and secret manually from /apikeys
  3. You will get URL, key and secret from that screen. add them in your container with keys CATTLE_URL, CATTLE_ACCESS_KEY, & CATTLE_SECRET_KEY