I have been installing kong ingress controller deployment from this script, which I’ve customized a little bit because I don’t have Postgres service like Statefulset, I have a manage Postgres Azure service and the idea is to connect to it.
When I finish my kubectl apply
command I get this output:
⟩ kubectl apply -f kongwithingres.yaml
namespace/kong created
customresourcedefinition.apiextensions.k8s.io/kongplugins.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongconsumers.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongcredentials.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongingresses.configuration.konghq.com created
serviceaccount/kong-serviceaccount created
clusterrole.rbac.authorization.k8s.io/kong-ingress-clusterrole created
role.rbac.authorization.k8s.io/kong-ingress-role created
rolebinding.rbac.authorization.k8s.io/kong-ingress-role-nisa-binding created
clusterrolebinding.rbac.authorization.k8s.io/kong-ingress-clusterrole-nisa-binding created
service/kong-ingress-controller created
deployment.extensions/kong-ingress-controller createdservice/kong-proxy created
deployment.extensions/kong created
job.batch/kong-migrations created
But my kong pods are in CrashLoopBackOff
status
⟩ kubectl get pods -n kong
NAME READY STATUS RESTARTS AGE
kong-57cfdc8687-7vkhd 0/1 Init:CrashLoopBackOff 1 6s
kong-ingress-controller-b9d5c7f64-v2rhf 0/2 Init:CrashLoopBackOff 30 133m
[I]
In this answer says that:
Kong cannot talk to the Postgres database.
My kubectl logs pod is the following:
kubectl logs kong-ingress-controller-b9d5c7f64-v2rhf -p -n kong
Error from server (BadRequest): a container name must be specified for pod kong-ingress-controller-b9d5c7f64-v2rhf, choose one of: [admin-api ingress-controller] or one of the init containers: [wait-for-migrations]
[I]
I am going to name of the code section that the error reference, precisely here and change the name of the container in the initContainers
attribute, but nothing change, I have the same CrashLoopBackOff
status
Is my problem communication with my external Postgres database?
How to can I point to my Azure Postgresql?
In these lines of the kong Deployment manifest, I am configuring the access to Postgres via env
attributes
The server name of my Postgres az database is this zcrm365-postgresql1.postgres.database.azure.com and I’ve created some rule name to allow
access from any point to my database.