<p>I'm looking up on the Kong API gateway and deployed a Kong instance on GKE via Google Cloud Marketplace. I want to add a custom Kong plugin to this instance and enable it for my services. How could I do it? are there any resources I could follow to get an idea on this? thank you.</p>

Darth Shirr
<p>if you are using docker </p>

<p>you can install any plugin in kong using <code>luarocks</code></p>

<p>For example here is one sample docker file </p>

<pre><code>FROM kong
ENV LUA_PATH /usr/local/share/lua/5.1/?.lua;/usr/local/kong-oidc/?.lua;;
# For lua-cjson
ENV LUA_CPATH /usr/local/lib/lua/5.1/?.so;;

# Install unzip for luarocks, gcc for lua-cjson
RUN yum install -y unzip gcc 
RUN luarocks install luacov
</code></pre>

<p>here one example of oidc plugin : <a href="https://github.com/nokia/kong-oidc" rel="nofollow noreferrer">https://github.com/nokia/kong-oidc</a> </p>

<p>we can install plugin using : <code>luarocks install &lt;plugin name&gt;</code></p>

<p>build your own custom docker image and use kong image as base docker image.</p>

<p>here whole example working <code>Dockerfile</code></p>

<pre><code>FROM kong:latest  
USER root
RUN apk update &amp;&amp; apk add git unzip luarocks
RUN luarocks install kong-oidc  
USER kong
</code></pre>

<p>by this way also you can add some of the community plugin and enterprise plugin in docker.</p>
