2

I'm using Helm v3 with AWS ECR on a Kubernetes cluster that was creating using Kops. I have checked and the role kops assigned to the nodes does have ECR permissions. When I deploy my helm chart I just get imagepullbackoff when doing kubectl get pods in the correct namespace.

Below is some of my helm chart code, I hope this is everything that's needed to debug this issue. BTW I have looked around on SO and google, both come up short on ECR with Helm and nothing for Helm 3 - was released recently.

Inside my values.yaml

image: repository: <number>.dkr.ecr.us-east-1.amazonaws.com/apigw # tag: latest tag: ef86dfe0b703 pullPolicy: IfNotPresent 

Note that the tag there is a git commit ID and spinnaker will change that on each deployment so here being static is just to test.

I was following this guide and as a result changed some things that might have effected it.

https://aws.amazon.com/blogs/opensource/deployment-pipeline-spinnaker-kubernetes/

Main one I think that makes a difference is

 imagePullPolicy: "{{ .Values.image.pullPolicy }}:{{ .Values.image.tag}}" 

to

imagePullPolicy: {{ .Values.image.pullPolicy }} 

However... If I change it back I get this error when trying to apply the helm chart

Error: Deployment.apps "apigw" is invalid: spec.template.spec.containers[0].imagePullPolicy: Unsupported value: "IfNotPresent:ef86dfe0b703": supported values: "Always", "IfNotPresent", "Never" 
3
  • Did you add a secret to k8s in order to pull the image? Commented Nov 21, 2019 at 10:43
  • @030 No? I added nothing to K8's for the images? I have the ECR role assigned to my nodes which should be good enough. What kind of secret are you thinking of? Commented Nov 21, 2019 at 23:26
  • I meant imagePullSecrets, see kubernetes.io/docs/tasks/configure-pod-container/… Commented Nov 22, 2019 at 8:56

2 Answers 2

1

Why are you adding the image tag to the pull policy? you dont need it there, just leave it like this: imagePullPolicy: {{ .Values.image.pullPolicy }}

0

Based on the error message it seems that the yaml is invalid:

Unsupported value: "IfNotPresent:ef86dfe0b703": supported values: "Always", "IfNotPresent", "Never" 

It seems that IfNotPresent contains some tag and that is unsupported.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.