i am trying to pull image from private registry and i get this error:
i created a namespace called myrelease, my helm command from my chart folder:
helm install myrelease -n myrelease .
http: server gave HTTP response to HTTPS client
i have made all changes required for docker to accept insecure registries.
first of all, i edit every /etc/docker/daemon.json on all nodes to:
{
"features": {
"buildkit": false
},
"insecure-registries" : [ "http://xx.xx.xx.xx:8082" ]
}
then i tried to login to my repo via:
docker login myrepo
and i SUCCEEDED.
when i try to install my helm chart, i did this configurations:
created templates/secret.yaml:
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.imageCredentials.name }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
i edited the templates/_helper.tpl file:
//added to the end of the file:
{{- define "imagePullSecret" }}
{{- with .Values.imageCredentials }}
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}
and in my values.yaml i do:
image:
repository: xx.xx.xx.xx:8082/helloworldwar
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "11"
imageCredentials:
name: nexuscreds
registry: xx.xx.xx.xx:8082/helloworld
username: xxxx
password: xxxx
email: xxxx@gmail.com
imagePullSecrets:
- name: nexuscreds
in docker info command i have my insecure repo listed:
Insecure Registries:
xx.xx.xx.xx:8082
127.0.0.0/8
and i still getting the error:
http: server gave HTTP response to HTTPS client