I am new to Kong world and i am facing some issues installing Kong on my Kubernetes cluster. I wanted to also discover Kong Manager und I took the Kong Enterprise (free version) route. Below is my chart for installing Kong:
image:
repository: kong/kong-gateway
tag: "2.3.3.2-alpine"
postgresql:
enabled: true
postgresqlUsername: kong
postgresqlDatabase: kong
postgresqlPassword: Hellomysecretpass1234!
# valueFrom:
# secretKeyRef:
# name: kong-postgresql-password
# key: password
service:
port: 5432
admin:
enabled: true
type: NodePort
http:
enabled: true
servicePort: 10254
containerPort: 10254
tls:
enabled: false
# servicePort: 8444
# containerPort: 8444
# parameters:
# - http2
ingress:
enabled: true
# tls: CHANGEME-admin-tls-secret
hostname: myadmin.someurl.com
annotations:
kubernetes.io/ingress.class: "kong"
path: /
proxy:
enabled: true
type: LoadBalancer
annotations: {}
http:
enabled: true
servicePort: 80
containerPort: 8000
parameters: []
# tls:
# enabled: true
# servicePort: 443
# containerPort: 8443
# parameters:
# - http2
stream: {}
ingress:
enabled: false
annotations: {}
path: /
externalIPs: [<my_node_static_ip>]
enterprise:
enabled: true
license_secret: kong-enterprise-license
vitals:
enabled: false
portal:
enabled: false
rbac:
enabled: true
admin_gui_auth: basic-auth
session_conf_secret: kong-session-config
admin_gui_auth_conf_secret: admin-gui-auth-conf-secret # CHANGEME-admin-gui-auth-conf-secret
smtp:
enabled: false
portal:
enabled: false
# enabled: true
# type: NodePort
# annotations:
# konghq.com/protocol: "https"
# http:
# enabled: true
# servicePort: 8003
# containerPort: 8003
# parameters: []
# ingress:
# enabled: true
# # tls: CHANGEME-portal-tls-secret
# hostname: myportal.someurl.com
# annotations:
# kubernetes.io/ingress.class: "kong"
# path: /
externalIPs: []
portalapi:
enabled: false
manager:
enabled: true
type: NodePort
annotations:
konghq.com/protocol: "https"
http:
enabled: true
servicePort: 8005
containerPort: 8005
# tls:
# enabled: true
# servicePort: 8445
# containerPort: 8445
# parameters:
# - http2
ingress:
enabled: true
# tls: CHANGEME-manager-tls-secret
hostname: mymanager.someurl.com
annotations: {}
path: /
externalIPs: []
env:
prefix: /kong_prefix/
database: postgres
pg_password: Hellomysecretpass1234!
pg_database: kong
password:
valueFrom:
secretKeyRef:
name: kong-enterprise-superuser-password
key: password
ingressController:
enabled: true
installCRDs: false
# tag: "1.3"
env:
kong_admin_token:
valueFrom:
secretKeyRef:
name: kong-enterprise-superuser-password
key: password
I have deployed this helm chart and below is the pod status:
NAME READY STATUS RESTARTS AGE
my-kong-kong-7bc7f68574-7v7z7 1/2 CrashLoopBackOff 21 55m
my-kong-kong-init-migrations-zn4nk 0/1 Completed 0 55m
my-kong-postgresql-0 1/1 Running 0 55m
I got the following logs by running:
kubectl logs -f my-kong-kong-7bc7f68574-7v7z7 -n kong -c proxy :
2021/06/03 10:36:49 [error] 25#0: *5024 [lua] api_helpers.lua:449: handle_error(): /usr/local/share/lua/5.1/lapis/application.lua:401: …/openresty/site/lualib/kong/enterprise_edition/init.ljbc:0: attempt to index field ‘license’ (a nil value)
stack traceback:
…/openresty/site/lualib/kong/enterprise_edition/init.ljbc: in function ‘f’
/usr/local/share/lua/5.1/kong/hooks.lua:25: in function ‘f’
/usr/local/share/lua/5.1/kong/hooks.lua:68: in function ‘run_hook’
/usr/local/share/lua/5.1/kong/api/routes/kong.lua:164: in function ‘fn’
/usr/local/share/lua/5.1/kong/api/api_helpers.lua:270: in function </usr/local/share/lua/5.1/kong/api/api_helpers.lua:253>stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/lapis/application.lua:401: in function ‘handler’
/usr/local/share/lua/5.1/lapis/application.lua:130: in function ‘resolve’
/usr/local/share/lua/5.1/lapis/application.lua:167: in function </usr/local/share/lua/5.1/lapis/application.lua:165>
[C]: in function ‘xpcall’
/usr/local/share/lua/5.1/lapis/application.lua:173: in function ‘dispatch’
/usr/local/share/lua/5.1/lapis/nginx.lua:230: in function ‘serve’
/usr/local/share/lua/5.1/kong/init.lua:1479: in function ‘admin_content’
content_by_lua(nginx-kong.conf:392):2: in main chunk, client: 127.0.0.1, server: kong_admin, request: “GET / HTTP/1.1”, host: “localhost:10254”
127.0.0.1 - - [03/Jun/2021:10:36:49 +0000] “GET / HTTP/1.1” 500 42 “-” “Go-http-client/1.1”
- - [03/Jun/2021:10:36:53 +0000] “GET /healthz HTTP/1.1” 404 23 “-” “kube-probe/1.20”
- - [03/Jun/2021:10:36:57 +0000] “GET /healthz HTTP/1.1” 404 23 “-” “kube-probe/1.20”
- - [03/Jun/2021:10:37:03 +0000] “GET /healthz HTTP/1.1” 404 23 “-” “kube-probe/1.20”
and this the output of ingress controller logs by running
kubectl logs -f my-kong-kong-7bc7f68574-7v7z7 -n kong -c ingress-controller :
Kong Ingress controller
Release: 1.2.0
Build: 22a38e8
Repository: git@github.com:Kong/kubernetes-ingress-controller.git
Go: go1.16.2W0603 11:13:14.188982 1 client_config.go:614] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
time=“2021-06-03T11:13:14Z” level=info msg=“version of kubernetes api-server: 1.20” api-server-host=“https://10.43.0.1:443” git_commit=132a687512d7fb058d0f5890f07d4121b3f0a2e2 git_tree_state=clean git_version=v1.20.7+rke2r2 major=1 minor=20 platform=linux/amd64
time=“2021-06-03T11:13:15Z” level=info msg=“retry 1 to fetch metadata from kong: HTTP status 500 (message: "An unexpected error occurred")”
time=“2021-06-03T11:13:17Z” level=info msg=“retry 2 to fetch metadata from kong: HTTP status 500 (message: "An unexpected error occurred")”
time=“2021-06-03T11:13:21Z” level=info msg=“retry 3 to fetch metadata from kong: HTTP status 500 (message: "An unexpected error occurred")”
time=“2021-06-03T11:13:29Z” level=info msg=“retry 4 to fetch metadata from kong: HTTP status 500 (message: "An unexpected error occurred")”
I would like to know what the problem is and it can be fixed
any help would be appreciated.