简体   繁体   中英

Custom helm chart - helm dep update fails with Error: stable/nginx-ingress chart not found in repo https://kubernetes-charts.storage.googleapis.com

How can I add stable/nginx-ingress as a dependency to my custom helm chart?

After trying a few different urls for the repository, I still have no luck.

Steps

  1. Created a new helm chart with helm create and editing the Chart.yaml to be
apiVersion: v2
name: acme
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
appVersion: 1.16.0
icon: https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png

dependencies:
  - name: stable/nginx-ingress
    version: ~1.34
    repository: https://kubernetes-charts.storage.googleapis.com
  1. Executed this command helm dep update acme

The output is the following

Error: stable/nginx-ingress chart not found in repo https://kubernetes-charts.storage.googleapis.com

Note

I have seen these Stack Overflow questions, but the answers were lacking explanation:

This question is not intended to be a duplicate. I'm not using Azure and I am using Helm 3.

The updated chart for helm3 is ready to use .

 helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm install my-release ingress-nginx/ingress-nginx

Original

The nginx-ingress chart is not published there yet. The progress is being tracked in kubernetes/ingress-nginx#5161 .

If you want to use the old chart you will need either a copy of the chart locally, or a version of the chart published to your own repo. For the local file dependency, get a copy of the current chart:

git clone https://github.com/helm/charts.git
cp -r charts/stable/nginx-ingress /path/to/acmes-parent-dir/

Then you can use a relative reference to the local directory:

dependencies:
- name: nginx-ingress
  version: "1.34"
  repository: "file://../nginx-ingress"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM