# Install multiple Kong ingresses using helm chart

**URL:** <https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020>\
**Category:** Questions\
**Created:** [April 14, 2020, 3:53pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020 "2020-04-14T15:53:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mkuna/32/1861_2.png) [@mkuna](https://discuss.konghq.com/u/mkuna)\
**Post date:** [April 14, 2020, 3:53pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/1 "2020-04-14T15:53:53Z")

</div>

I have found number of articles with instructions how to install multiple Kong ingresses each in it’s own namespace - all of them were using kubectl and custom YAML files.  
Can the same be done using helm chart at [https://charts.konghq.com](https://charts.konghq.com) ?  
Thanks

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [April 14, 2020, 8:12pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/2 "2020-04-14T20:12:38Z")

</div>

> [@mkuna](#):
>
> Can the same be done using helm chart at [https://charts.konghq.com](https://charts.konghq.com) ?

Yes, of course. What issue did you run into?

---

<div class="post-metadata">

**Author:** ![mkuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mkuna/32/1861_2.png) [@mkuna](https://discuss.konghq.com/u/mkuna)\
**Post date:** [April 15, 2020, 5:27am UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/3 "2020-04-15T05:27:08Z")

</div>

I want install two independent kong ingresses into k8s cluster - one for production and another for dev/test. I understand that in order to have multiple kong ingresses in one k8s cluster, I need to create separate service account and role for each of them and ingress controllers have to be deployed to separate namespaces.  
But looking into Kong chart readme ([https://github.com/Kong/charts/tree/master/charts/kong](https://github.com/Kong/charts/tree/master/charts/kong)) I do not see any parameter/value that I can use to control what namespace is Kong deployed to, whether it is assigned cluster or namespace rights. Could you please share an example of how to do this?  
Thanks  
Marian

---

<div class="post-metadata">

**Author:** ![dieunb](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/dieunb/32/1858_2.png) [@dieunb](https://discuss.konghq.com/u/dieunb)\
**Post date:** [April 16, 2020, 1:42pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/4 "2020-04-16T13:42:42Z")

</div>

@mkuna  
It does not depend on the Kong chart.  
You can define a helm release like the following:

```
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  name: kong
  namespace: your_namespace
  ...
spec:
  ...
  values:
  ...

```

Or if you are using helm to install, it should be

```auto
helm install --name kong --namespace your_namespace -f kong_values.yaml kong/kong

```

---

<div class="post-metadata">

**Author:** ![flowdopip](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/flowdopip/32/1704_2.png) [@flowdopip](https://discuss.konghq.com/u/flowdopip)\
**Post date:** [April 16, 2020, 4:42pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/5 "2020-04-16T16:42:03Z")

</div>

hi,

I had exactlly the some problem and when i change the deployment args

```auto
 - args:
        - /kong-ingress-controller
        - --kong-url=https://localhost:8444
        - --admin-tls-skip-verify
        - --publish-service= **<namespace>** /kong-proxy

```

publish service need the namespace

---

<div class="post-metadata">

**Author:** ![mkuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mkuna/32/1861_2.png) [@mkuna](https://discuss.konghq.com/u/mkuna)\
**Post date:** [April 20, 2020, 12:03pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/6 "2020-04-20T12:03:27Z")

</div>

Thank you @flowdopip  
could you please elaborate a bit of how you actually installed kong?

Did you just download the yaml file ([https://bit.ly/kong-ingress-dbless](https://bit.ly/kong-ingress-dbless)) and modify the deployment args? What else did you modify in that yaml? I suppose you had to apply the yaml 2 times, once for ech namespace. right?

Or did you install kong using helm chart at [https://charts.konghq.com](https://charts.konghq.com)? How did you pass the modified args section to helm?

---

<div class="post-metadata">

**Author:** ![mkuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mkuna/32/1861_2.png) [@mkuna](https://discuss.konghq.com/u/mkuna)\
**Post date:** [April 20, 2020, 12:08pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/7 "2020-04-20T12:08:48Z")

</div>

Thanks @dieunb  
so if I want to use helm, do I just have to run `helm install...` once for each namespace?

---

<div class="post-metadata">

**Author:** ![dieunb](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/dieunb/32/1858_2.png) [@dieunb](https://discuss.konghq.com/u/dieunb)\
**Post date:** [April 20, 2020, 12:58pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/8 "2020-04-20T12:58:39Z")

</div>

Yes, that right @mkuna  
But I highly recommend you do it by using the helm release file.  
One helm release per namespace what you want. It helps you to be easy to tracking, changing and updating.

---

<div class="post-metadata">

**Author:** ![mkuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mkuna/32/1861_2.png) [@mkuna](https://discuss.konghq.com/u/mkuna)\
**Post date:** [April 20, 2020, 1:08pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/9 "2020-04-20T13:08:46Z")

</div>

> [@dieunb](#):
>
> HelmRelease

Thanks, will give it a try. Using helm release file sounds like a goo idea.

---

<div class="post-metadata">

**Author:** ![traines](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/traines/32/158_2.png) [@traines](https://discuss.konghq.com/u/traines)\
**Post date:** [April 20, 2020, 8:42pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/10 "2020-04-20T20:42:37Z")

</div>

We’ll probably move towards allowing users to create releases that deploy the controller only in the future, for this and a few other use cases where it’s useful. As-is it works to configure the controller environment to talk to a Kong instance outside its pod, but no way to disable the Kong deployment without manually removing the template.

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [April 20, 2020, 9:35pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/11 "2020-04-20T21:35:50Z")

</div>

@traines This came up in another unrelated discussion as well. Let’s make sure we are tracking it internally. This structure will become more important as adoption of hybrid mode of Kong becomes mainstream.

---

<div class="post-metadata">

**Author:** ![mkuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mkuna/32/1861_2.png) [@mkuna](https://discuss.konghq.com/u/mkuna)\
**Post date:** [April 21, 2020, 11:58am UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/12 "2020-04-21T11:58:09Z")

</div>

@dieunb @flowdopip  
Thank you for your help. I have successfully installed kong into “dev” namespace via helm chart at kong/kong. I had to also specify args mentioned by @flowdopip (via custom values file).

Just want to check one thing: If I want to have multiple kong ingress controllers, I need to specify unique ingress-class for each of them; the name of the class is then used when installing plugins to reference particular ingress controller like:

```auto
    annotations :
       kubernetes.io/ingress.class : my-kong-1

```

Is that right?

@hbagdi @traines  
It would be great if helm chart could use the namespace and release name to render the args when creating ingress controller:

```auto
- args:
...
   - --publish-service=<namespace>/<kong-proxy-name>

```

where `<kong-proxy-name>` is renerred as `<release_name>-kong-proxy`

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [April 22, 2020, 8:58pm UTC](https://discuss.konghq.com/t/install-multiple-kong-ingresses-using-helm-chart/6020/13 "2020-04-22T20:58:32Z")

</div>

> [@mkuna](#):
>
> Is that right?

You also need to annotate Ingress resources in addition to KongPlugin resources.

> [@mkuna](#):
>
> It would be great if helm chart could use the namespace and release name to render the args when creating ingress controller:

The chart already does that.
