Hello world
Hello world

Reputation: 353

Migrate helm chart from public repository to private

I'm trying to deploy some services using helm chart on AWS EKS.

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install postgresql --version 8.6.4 bitnami/postgresql

After I run helm command, pod is not created because connection to docker.io is blocked in the EKS.

$ kubectl describe po 
...
Events:
  Type     Reason                  Age                  From                     Message
  ----     ------                  ----                 ----                     -------
  Normal   Scheduled               12m                  default-scheduler        Successfully assigned airflow/postgresql-postgresql-0 to xxxxxx.compute.internal
  Normal   SuccessfulAttachVolume  12m                  attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-e3e438ef-50a4-4c19-a788-3d3755b89bae"
  Normal   Pulling                 9m50s (x4 over 12m)  kubelet                  Pulling image "docker.io/bitnami/postgresql:11.7.0-debian-10-r26"
  Warning  Failed                  9m35s (x4 over 11m)  kubelet                  Failed to pull image "docker.io/bitnami/postgresql:11.7.0-debian-10-r26": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
  Warning  Failed                  9m35s (x4 over 11m)  kubelet                  Error: ErrImagePull
  Warning  Failed                  9m23s (x6 over 11m)  kubelet                  Error: ImagePullBackOff
  Normal   BackOff                 113s (x36 over 11m)  kubelet                  Back-off pulling image "docker.io/bitnami/postgresql:11.7.0-debian-10-r26"

How can I change repository domain from docker.io to my ECR repository?

  1. I want to push this chart to my ECR repository.
  2. I want to make chart to pull the image not from docker.io but from my ECR repository.

Upvotes: 0

Views: 1540

Answers (1)

Daein Park
Daein Park

Reputation: 4693

How about try to override the repository domain value in values.yaml of the bitnami/postgresql using --set. Refer here for more details.

image:
  registry: docker.io
  repository: bitnami/postgresql
  tag: 11.10.0-debian-10-r24

You may override above image.registry value as follows.

$ helm install postgresql \
  --set image=your-registry/bitnami/postgresql:11.10.0-debian-10-r24 \
  --version 8.6.4 bitnami/postgresql

Upvotes: 4

Related Questions