How to use imagePullSecrets: [] in Helm 3
Helm 3 imagePullSecrets: [] secrete gives an error.
Error: unable to build Kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec.template.spec.imagePullSecrets[0]): invalid type for io.k8s.api.core.v1.LocalObjectReference: got "string", expected "map"
I use this setup and works fine.
In deployment.yaml
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
In values.yaml
imagePullSecrets:
- name: regcred
And create secret regcred
manually using
kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
You can find detailed documentation here