Closed tienhuynh17 closed 1 week ago
hello, we have 2 kong KIC instances (green and blue) running in the same namespace without issues (if they have the same custom plugins)
they are configured as such:
the ingress controller config is (values.yaml
file) is
ingress:
controller:
ingressController:
ingressClass: kong-green
# see https://docs.konghq.com/kubernetes-ingress-controller/latest/reference/cli-arguments/
env:
ingress_class: kong-green
similarly, for the blue instance, replace kong-green
by kong-blue
. You get the idea. Finally, those values must also be applied on the Gateway and GatewayClass
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: kong-green
annotations:
konghq.com/gatewayclass-unmanaged: 'true'
spec:
controllerName: konghq.com/kong-green
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong-green
spec:
gatewayClassName: kong-green
...
if you have different custom plugins in the kong instances, they will fail --> see https://github.com/Kong/charts/issues/1103. So make sure you are exactly the same custom plugins in both kong instances.
also, the ingressClass
is repeated twice, as it also needs to be set in the env vars --> https://github.com/Kong/charts/issues/1100
good luck
Many thanks @joran-fonjallaz, it works well for me. Here is my config (kong2):
gateway:
plugins:
configMaps:
- name: kong1-plugin-auth
pluginName: kong1-plugin-auth
- name: kong2-plugin-auth
pluginName: kong2-plugin-auth
controller:
ingressController:
ingressClass: kong2-gateway-controller
env:
gateway_api_controller_name: konghq.com/kong2-gateway-controller
ingress_class: kong2-gateway-controller
Hi, thanks for your great work on KIC. I have a problem when trying to install 2 KIC instances on the same namespace.
The first instance: I install by command:
The values1.yaml files:
It works well.
The second instance: Then I install by command:
The values2.yaml files:
Deployment/kong2-gateway logs the error below:
Confimap kong1-plugin-auth, kong2-plugin-auth already created before. Does this error occur because 2 instances are running in the same namespace ? I researched and can not find it. Do I have to separate 2 instances in 2 different namespaces ?
Any help will be appreciated, Thank you.