0

I'm using KONG in Kubernetes in DB less mode. I'm trying to add plugins in a declarative way.

Where can I find the config file for Kuberenetes?

How to add the plugins in that file?

Chitraveer Akhil
  • 147
  • 1
  • 5
  • 18

1 Answers1

0

You can install the plugin to Kong with Console(UI) or else you can add by installing with docker build

Example docker file installing Plugin with lua

FROM kong:2.0.3-alpine
LABEL description=”Alpine + Kong 2.0.3 + kong-oidc plugin”ENV OIDC_PLUGIN_VERSION=1.1.0–0
ENV JWT_PLUGIN_VERSION=1.1.0–1
USER root
RUN apk update && apk add git unzip luarocks
RUN luarocks install kong-oidc
RUN git clone — branch 20200505-access-token-processing https://github.com/BGaunitz/kong-plugin-jwt-keycloak.git \
 && cd kong-plugin-jwt-keycloak \
 && luarocks make
RUN luarocks pack kong-plugin-jwt-keycloak ${JWT_PLUGIN_VERSION} \
 && luarocks install kong-plugin-jwt-keycloak-${JWT_PLUGIN_VERSION}.all.rock
USER kong

Once docker is built you can update the image.

You can refer my article further if you need more information : https://faun.pub/building-kong-custom-docker-image-add-a-customized-kong-plugin-2157a381d7fd

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
  • Thanks I'm using Kuberenetes Ingress to install KONG. Where can find the config file? – Chitraveer Akhil Feb 28 '22 at 13:52
  • once your kong is updated you have to update the deployment of Kong first there wont be any changes in ingress file. Not sure what do you mean `I'm using Kuberenetes Ingress to install KONG` – Harsh Manvar Mar 01 '22 at 05:45