Kong Ingress stuck on install

I have a problem when Im trying to install kong ingress with helm using postgresql. Im using helm chart to install that, using this values.yaml file:

  database: 'postgres'
  pg_host: ''
  pg_port: 5432
  pg_user: 'kongtest'
  pg_password: 'kongtest'
  pg_database: 'kongtest'

  installCRDs: false
  ingressClass: kong-test

  enabled: true
    enabled: true
    enabled: false
    enabled: true
      kubernetes.io/ingress.class: kong-test
      konghq.com/strip-path: "true"
    path: /kong
helm install kong-test kong/kong -f values.yaml

And when I see pods status this are stuck on Init:0/1

kong-test-kong-58c6d94bd9-t7vds                           0/2     Init:0/1    0          133m
kong-test-kong-init-migrations-kndjn                      0/1     Completed   0          133m

and the pod logs show me this:

F1203 14:31:13.859375   25215 helpers.go:115] error: a container name must be specified for pod kong-test-kong-58c6d94bd9-t7vds, choose one of: [ingress-controller proxy] or one of the init containers: [wait-for-db]

Another interesting thing is that the seeds have been executed correctly, checking the database it has been populated correctly with the tables that kong creates.

kubectl logs just won’t display all container logs by default, and furthermore, IIRC, the --all-containers flag doesn’t get init container logs. kubectl logs PODNAME -c wait-for-db should show you the issue.

Bit odd that the migrations job would complete successfully and then the main pod after would fail–they use the same database configuration and if the former works, the latter should also. Could be that the migrations job didn’t actually execute correctly but somehow reported it did, but in any case, the init container logs should indicate the issue preventing startup.

1 Like

I found the solution adding this env var in my values.yaml

KONG_LUA_PACKAGE_PATH: './?.lua;./?/init.lua;'

according to this post:

Im not implementing any new plugin, only a new fresh kong ingress instance inside k8s, but its works for me.

© 2019 Kong Inc.    Terms  â€˘  Privacy  â€˘  FAQ