Kong / kong-python-pdk

Write Kong plugins in Python (Experimental)
Apache License 2.0
45 stars 14 forks source link

How i can use Python based custom plugins in Helm Based Kong deployment #18

Closed bikashkumars closed 2 years ago

bikashkumars commented 3 years ago

I am using python hello world plugin to test how custom plugin works. I am using Kong helm chart for deployment. But pod logs shows, it is unable to process the plugin.

I don’t want to use Lua, rather we want to use python as language for our custom plugins. Any help on how to enable python plugin in helm based kong deployment.

Added hello.py to configmap using following command kubectl create configmap kong-plugin-hello --from-file=hello.py -n localkong

plugins:

configMaps:

fffonion commented 3 years ago

Hi @bikashkumars with external languages plugins like Python or JS, you will need to install the "PDK" (pip install kong-pdk in your case) inside contianer, and copy the source file (hello.py in your case) into the container. Please see docs at https://docs.konghq.com/enterprise/2.4.x/external-plugins/#developing-python-plugins.

fffonion commented 2 years ago

Closing for inactivity, please re-open if necessary ; )