Kong-proxy not working inside Jelastic environment

Hello Everyone,

I need a bit of help trying to install Kong in Kubernetes inside Jelastic environment. I have a production based kubernetes cluster with the following:

  • Load Balancer
    • 1 Node with Public IP
  • Workers
    • 2 Nodes
  • Storage
    • 3 Nodes with NFS storage
  • Control Plane
    • 3 Nodes

By default, this environment has ingress-nginx which loads the Hello Kuberenetes application just fine. Here is the config for the ingress-nginx hello kubernetes example:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: helloworld
  namespace: default
spec:
  ingressClassName: nginx
  rules:
  - http:
      paths:
      - backend:
          service:
            name: hello-kubernetes
            port:
              number: 80
        path: /
        pathType: Prefix
status:
  loadBalancer: {}

However, when I install Kong and switch the ingress class to Kong, it returns 404. Some context on how I install Kong:

  1. Setting the config for the metallb-system and assign the public ip address:
apiVersion: v1
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - XXX.XXX.XXX.35-XXX.XXX.XXX.35
kind: ConfigMap
metadata:
  name: config
  namespace: metallb-system
  1. Restarting the controller and the pods in the metallb-system name-space
  2. Installing Kong using the https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/main/deploy/single/all-in-one-postgres.yaml
  3. It gets assigned the Public IP for the kong-proxy service.
  4. Editing the helloWorld ingress like so and changing the ingressClassName to kong:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: helloworld
  namespace: default
spec:
  ingressClassName: kong
  rules:
  - http:
      paths:
      - backend:
          service:
            name: hello-kubernetes
            port:
              number: 80
        path: /
        pathType: Prefix
status:
  loadBalancer: {}

When the above configs are applied, I get a 404 Not found by Nginx when visiting the Public IP.


Note: When I use the curl http://PUBLIC_IP inside the Jelastic environment, it loads the hello kubernetes application just fine when the IngressClassName is set to kong. However, it does not work publicly.

I would really appreciate some help on this one. Please and thank you.

That sounds like something gone awry in your external routing or in metallb. If you’re able to port-forward to the Kong proxy Service and send requests that do reach the hello application, the controller and proxy are functioning normally, and there’s nothing more you need to do other than ensure that traffic is delivered to them.

Unfortunately I don’t know too much about the metallb internals that would explain why it would balance traffic to one Service if the request is internal to the cluster and another if it’s external. My first guess would be that whatever router is responsible for delivering traffic from outside the cluster isn’t actually sending traffic to the metallb instance/thinks some other device controls that IP, but I wouldn’t have any idea of what that other device is.