Share a DB across ingresses kong 0.36-2

Hi.

We are facing an issue in my work where the kong-ingress-controller pod in our kubernetes clusters are being deleted suddenly without notice and being recreated after 5 or 10 minutes.

i found this output in the logs of the ingress-controller container

1 main.go:411] Running in Kubernetes Cluster version v1.10 (v1.10.12) - git (clean) commit c757b93cf034d49af3a3b8ecee3b9639a7a11df7 - platform linux/amd64
I0617 22:02:44.702525 1 main.go:153] kong version: 0.36.2-enterprise
I0617 22:02:44.702573 1 main.go:162] Kong datastore: postgres
I0617 22:02:45.138921 1 controller.go:242] starting Ingress controller
E0617 22:02:45.140110 1 main.go:315] error running the admission controller server:open /admission-webhook/tls.crt: no such file or directory
I0617 22:02:45.201532 1 status.go:201] new leader elected: kong-ingress-controller-7f55f9d8d7-8ntnv
I0617 22:03:20.901592 1 status.go:201] new leader elected: kong-ingress-controller-7f55f9d8d7-bsd8j
W0617 22:03:20.916671 1 parser.go:772] service simsqa/service-algoconfig-visualization does not have any active endpoints
W0617 22:03:20.916884 1 parser.go:772] service simsqa/service-terminal does not have any active endpoints
W0617 22:03:20.916941 1 parser.go:772] service simsqa/service-terminal-visualization does not have any active endpoints
W0617 22:03:20.916997 1 parser.go:772] service simsqa/service-oasis-data-translator does not have any active endpoints
W0617 22:03:20.917100 1 parser.go:772] service simsqa/service-error-visualization does not have any active endpoints
W0617 22:03:20.917158 1 parser.go:772] service simsqa/service-plan-visualization does not have any active endpoints
W0617 22:03:20.917347 1 parser.go:772] service simsqa/service-user-visualization does not have any active endpoints
W0617 22:03:20.917381 1 parser.go:772] service simsqa/service-plan-analyzer does not have any active endpoints
W0617 22:03:20.917477 1 parser.go:772] service simsqa/service-static-data-adapter does not have any active endpoints
W0617 22:03:20.917569 1 parser.go:772] service simsqa/service-data-snapshot does not have any active endpoints
W0617 22:03:20.917688 1 parser.go:772] service simsqa/service-resource-visualization does not have any active endpoints
W0617 22:03:20.917716 1 parser.go:772] service simsqa/service-yard-visualization does not have any active endpoints
W0617 22:03:20.917845 1 parser.go:772] service simsqa/service-workordermanagement does not have any active endpoints
W0617 22:03:20.917900 1 parser.go:772] service simsqa/service-rabbitmq does not have any active endpoints
W0617 22:03:20.917973 1 parser.go:772] service simsqa/service-user does not have any active endpoints
W0617 22:03:20.918163 1 parser.go:772] service simsqa/service-terminal-ui does not have any active endpoints
W0617 22:03:20.918205 1 parser.go:772] service simsqa/service-analytics does not have any active endpoints
W0617 22:03:20.918232 1 parser.go:772] service simsqa/service-hub-planner-adapter does not have any active endpoints
W0617 22:03:20.918287 1 parser.go:772] service simsqa/service-resource does not have any active endpoints
W0617 22:03:20.918365 1 parser.go:772] service simsqa/service-error-manager does not have any active endpoints
W0617 22:03:20.918390 1 parser.go:772] service simsqa/service-uaa does not have any active endpoints
W0617 22:03:20.918430 1 parser.go:772] service simsqa/service-configservice does not have any active endpoints
W0617 22:03:20.918454 1 parser.go:772] service simsqa/service-train does not have any active endpoints
W0617 22:03:20.918479 1 parser.go:772] service simsqa/service-inventory does not have any active endpoints
W0617 22:03:20.918514 1 parser.go:772] service torq-ops/portal does not have any active endpoints
W0617 22:03:20.918539 1 parser.go:772] service simsqa/service-smartworkorder does not have any active endpoints
I0617 22:03:23.613690 1 controller.go:135] successfully synced configuration to Kong

after searching in google i found this link: https://github.com/Kong/kubernetes-ingress-controller/issues/510

that had a similar output and it says at the end that kong does not support a shared db across ingress.

My question is does kong enterprise 0.36-2 support a shared posgres-db across several kubernetes ingresses?

if it is, please someone could give me a little guidance on how to debug on thy the kong ingress controller pod is being deleted every without notice in a daily basis?

Thanks!

Do you see any logs of interest in the Kong container? Since they usually share a Pod with the controller, either failing could trigger a restart. kubectl describe pod PODNAME and kubectl describe deploy DEPLOYMENTNAME may give you some info about what happened in its events section.

Sharing a database across clusters in the strictest sense isn’t usually possible–you can share a Postgres instance but the Kong clusters will need to use separate databases most of the time. There are some scenarios where this isn’t true, but I wouldn’t go into them unless you’ve already described a use case that absolutely requires doing so–those setups are necessarily fairly nonstandard and complex, so I’d usually recommend avoiding them. In either case, that sort of architecture decision likely isn’t related to the restart issue.