Kong (with DB) installation using helm on EKS

Hi, I am trying to install Kong using helm on the EKS cluster. I am using Postgres RDS as DB.

Below is the content of values.yaml file

env:
  database: "postgres"
  pg_host: aws-kong.123456789.a-aws-region.rds.amazonaws.com
  pg_port: 5432
  pg_user: dummyadmin
  pg_password: dummypassword
  pg_database: kongdb
  nginx_worker_processes: "1"
  proxy_access_log: /dev/stdout
  admin_access_log: /dev/stdout
  admin_gui_access_log: /dev/stdout
  portal_api_access_log: /dev/stdout
  proxy_error_log: /dev/stderr
  admin_error_log: /dev/stderr
  admin_gui_error_log: /dev/stderr
  portal_api_error_log: /dev/stderr
  prefix: /kong_prefix/
admin:
  annotations: {}
  #  service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
  http:
    enabled: true
    servicePort: 8001
    containerPort: 8001
    parameters: []
  tls:
    enabled: true
    servicePort: 8444
    containerPort: 8444

Using below helm command to install Kong

helm upgrade -i kong -n kong -f values.yaml kong/kong --set ingressController.installCRDs=false;

Once the above helm command is executed, the pods are not coming to running state, below is status, it is stuck to initialize.

NAME                                           READY   STATUS     RESTARTS   AGE
kong-kong-6447659bbf-9jl9d        0/2     Init:0/1           0          7m59s
kong-kong-init-migrations-87r74   0/1     Init:0/1          0          7m59s

@traines @hbagdi Please help, what can be the issue?

These two services require your DB to run first, you can describe your pod to see the specific pod information.

The init containers do indeed check for database availability. You can check

kubectl logs kong-kong-init-migrations-87r74 -c wait-for-postgres
kubectl logs kong-kong-6447659bbf-9jl9d -c wait-for-db

Those should roughly indicate what’s failing when they try to connect. The first should generally fail with either a DNS failure or some sort of TCP connection failure. The latter seems more likely; I’d first check to confirm that you have the necessary AWS network ACLs and security restrictions to allow traffic between your EKS workers and the database instance:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html
https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html

Thanks for pointing out @traines.

It was an issue with a TCP connection between Pods and AWS RDS. After fixing the TCP connection, I can see kong migration in Completed state and kong in Running state.

$ kubectl get pods -n kong
**NAME                                                READY   STATUS      RESTARTS   AGE**
kong-kong-6447659bbf-9jl9d            2/2        Running          1                   2h
kong-kong-init-migrations-87r74       0/1       Completed      0                  2h

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ