Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Kubernetes InvalidImageName pulling a Docker image from private repository

I’m trying, for a simple test, to connect my local Kubernetes instance (running in Docker Desktop) to a private repository on AWS ECR in order to download and Install a simple Java Web Application but after the installation of the Helm chart I get an error "InvalidImageName" from the k9s console.

I already pushed the application docker image into the registry and the URI is something like:

123456789.dkr.ecr.eu-west-1.amazonaws.com/myapp:0.0.3

I also created an Helm chart to deploy the webapp on k8s an I configured the values.xml in this way:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

image:
  repository: 123456789.dkr.ecr.eu-west-1.amazonaws.com/myapp:0.0.3
  pullPolicy: IfNotPresent

imagePullSecrets:
  - name: ecrtest-sec

I also created the Kubernetes secret passing my accesskey and secret key credentials for ECR like:

kubectl create secret docker-registry ecrtest-sec --docker-server=123456789.dkr.ecr.eu-west-1.amazonaws.com --docker-username=myusername --docker-password=mypassword --docker-email=myemailaddress

but, as I said before, it doesn’t work for the error aforementioned:

"InvalidImageName"

>Solution :

Try this:

image:
     repository: "123456789.dkr.ecr.eu-west-1.amazonaws.com/myapp"
     tag: "0.0.3"
     pullPolicy: IfNotPresent
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading