Hi Kong Nation,
I’m new to Kubernetes and I have deployed Kong Ingress controller on AKS following this guide https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/deployment/aks.md
and it works fine
I then developed a custom plugin (test-introspection) which I have tested on my local deployment which is not Kubernetes and it also works fine. Now I need to move it to my AKS environment and I’m stuck!! Looked for a step-by-step guide/documentation on how to do this and I can’t find any except this discussion Custom Plugin not enabled
From what I gathered I need to do the following steps
Create a ConfigMap. - DONE
$ kubectl get configMap NAME DATA AGE test-custom-plugin 2 26h
Mount the volumes to the pods - No idea how to do this but I created the chart below
apiVersion: v1 kind: Pod metadata: name: kongPlugin-config namespace: kong spec: serviceAccountName: kong-ingress-controller containers: - name: kong image: kong:1.2 volumeMounts: - name: config-volume mountPath: /etc/kong/plugins/ volumes: - name: config-volume configMap: name: test-custom-plugins
*** Is the chart correct?**
*** How do I run it?**
- Update the deployment YAML for both kong and ingress. Setting the KONG_PLUGINS environment variable to bundled, test-introspection. And set the KONG_LUA_PACKAGE_PATH environment variable as well.
Exec into the Kong container and curl the / on Admin interface and make sure that these properties are set correctly - How do I do this?
Question: Is the chart below enough?
echo " apiVersion: apps/v1beta2 kind: Deployment metadata: spec: template: spec: containers: env: - name: KONG_PLUGINS value: bundle, test-introspection - name: KONG_LUA_PACKAGE_PATH value: /etc/?.lua;/etc/kong/plugins/test-introspection/?.lua;; " | kubectl apply -f -
Is this correct?
- Enable plugin (kongPlugin.yaml)
$ kubectl get Kongplugins NAME PLUGIN-TYPE AGE custom-introspection test-introspection 20h
Please guide me - especially mounting the volumes from my ConfigMap.
Thank you in advance