I have issue like this but something different or that is not solution
I dont’t know how to solve this problem.
I installed stable charts kong and add postgres chart in kong/charts
helm install --name kong
–set ‘ingressController.enabled=true’
./kong
that page said solution is bellow.
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgresql
but stable chart of postgreSQL already have this Shoud I change the name?
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
subPath: {{ .Values.persistence.subPath }}
volumeMounts:
- mountPath: /bitnami/postgresql
name: data
volumes:
name: data
persistentVolumeClaim:
claimName: data-my-postgresql-0
wait-for-db container log
database needs bootstrapping; run ‘kong migrations bootstrap’
Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:50: nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:337: database needs bootstrap; run ‘kong migrations bootstrap’
stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/kong/init.lua:337: in function ‘init’
init_by_lua:3: in main chunk
lua:3: in main chunk
Run with --v (verbose) or --vv (debug) for more details
waiting for db
postgresql-0 log
2019-06-20 06:36:41.743 GMT [228] LOG: database system was shut down at 2019-06-20 06:36:40 GMT
2019-06-20 06:36:41.750 GMT [1] LOG: database system is ready to accept connections
When you use Helm installation, it will automatically run the migrations for you.
Could you share the logs of the Job container that gets installed as part of the release?
** “nc -zv” is wrong command.
Is it right change?**
wait-for-postgres container log
command: [ “/bin/sh”, “-c”, “until nc -zv $KONG_PG_HOST $KONG_PG_PORT -w1; do echo ‘waiting for db’; sleep 1; done” ]
=> command: [ “/bin/sh”, “-c”, “until nslookup $KONG_PG_HOST; do echo ‘waiting for db’; sleep 1; done” ]
waiting for db
nc: invalid option – z
waiting for db
BusyBox v1.22.1 (2014-05-22 23:22:11 UTC) multi-call binary.
Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]
Open a pipe to IP:PORT or FILE
-l Listen mode, for inbound connects
(use -ll with -e for persistent server)
-p PORT Local port
-w SEC Connect timeout
-i SEC Delay interval for lines sent
-f FILE Use file (ala /dev/ttyS0) instead of network
-e PROG Run PROG after connect
[ job working correctly after change of command ]
waiting for db
Server: 10.221.0.10
Address 1: 10.221.0.10 kube-dns.kube-system.svc.cluster.local
nslookup: can’t resolve ‘my-postgresql’
waiting for db
Server: 10.221.0.10
Address 1: 10.221.0.10 kube-dns.kube-system.svc.cluster.local
Name: my-postgresql
Address 1: 10.221.145.198 my-postgresql.nms.svc.cluster.local
But I met another issue of "password authentication failed" How can I fix it?
kong-migrations container log
Error: [PostgreSQL error] failed to retrieve server_version_num: FATAL: password authentication failed for user “kong”
Run with --v (verbose) or --vv (debug) for more details
[ingress-controller log]
I0626 00:05:17.724135 7 controller.go:128] syncing Ingress configuration…
I0626 00:05:17.731865 7 kong.go:1027] creating Kong Upstream with name test.checker.8080
I0626 00:05:17.754316 7 kong.go:241] creating Kong Target 10.220.5.78:8080 for upstream e4538c0b-bdd0-4f61-baf4-db3c8f753a8e
I0626 00:05:17.866510 7 kong.go:113] syncing global plugins
W0626 00:05:17.867338 7 kong.go:335] there is no custom Ingress configuration for rule test/checker
I0626 00:05:17.868309 7 kong.go:401] Creating Kong Service name test.checker.8080
W0626 00:05:17.885778 7 kong.go:751] there is no custom Ingress configuration for rule test/checker
admin-api log
2019/06/26 00:08:13 [crit] 44#0: *26 [lua] balancer.lua:728: init(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
2019/06/26 00:08:13 [crit] 38#0: *10 [lua] balancer.lua:728: init(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
10.220.2.1 - - [26/Jun/2019:00:08:28 +0000] “GET /status HTTP/1.1” 200 205 “-” “kube-probe/1.13”
10.220.2.1 - - [26/Jun/2019:00:08:58 +0000] “GET /status HTTP/1.1” 200 205 “-” “kube-probe/1.13”