Search code examples
kuberneteskubernetes-helmbitnami

Bitnami Umbrella chart - a subchart for multiple application


I am using helm bitnami charts for my application to deploy in kubernetes.

My application contains following 3 components,

Web UI Web API 1 Web API 2 Here Web UI is the static UI application in nginx server and the Web API 1 and Web API 2 are the aspnet core web API application called in Web UI application.

Currently deploying like below,

The Web UI using nginx chart - https://hub.helm.sh/charts/bitnami/nginx

helm install web-ui-dev bitnami/nginx

The Web API 1 using aspnet-core chart - https://hub.helm.sh/charts/bitnami/aspnet-core

helm install web-api1-dev bitnami/aspnet-core

The Web API 2 also using same aspnet-core chart

helm install web-api2-dev bitnami/aspnet-core

Since my application is dependent on 3 components, i am planning to use the helm umbrella chart. So created a parent chart (say 'ag') with below dependencies in chart.yaml file and in values.yaml giving all the subchart values.

dependencies:
    - name: nginx
      version: 6.2.0
      repository: https://charts.bitnami.com/bitnami
    - name: aspnet-core
      version: 0.2.0
      repository: https://charts.bitnami.com/bitnami

But the problem here i could not use the aspnet-core chart to deploy both Web API 1 and Web API 2 in a single helm install command of umbrella chart.

When i say helm install dev ag its not installing all 3 components, either i can deploy Web API 1 or Web API 2.

Any idea to make this work of using the single helm install of umbrella chart to deploy multiple applications of same chart.

Thanks.


Solution

  • you can use alias in your dependencies file. like this.

        - name: nginx
          version: 6.2.0
          repository: https://charts.bitnami.com/bitnami
        - name: aspnet-core
          version: 0.2.0
          repository: https://charts.bitnami.com/bitnami
          alias: web-api1-dev
        - name: aspnet-core
          version: 0.2.0
          repository: https://charts.bitnami.com/bitnami
          alias: web-api2-dev
    

    Then use aliases in your main values.yaml file.