Setting up a Kong Ingress Controller in Rancher 2.5

Hello all,

I am trying to set up Kong as an ingress controller on a test air-gapped Rancher bare metal environment.

I have used the instructions for minikube on this page Kong Ingress on Minikube - v1.3.x | Kong Docs

The actual deployment installs fine and shows no error. The service LoadBalancer however is in a “pending” state. This seems consistent with the fact that this is a bare-metal set-up without a software LoadBalancer installed.

I have noticed however that although the service is in a pending state I can still run the test curl command if I use a node IP and the port in the 30000 range I get when I inspect the state of the service via kubectl.

My questions are:
Could I just replace the LoadBalancer service for a NodePort one so that the service is not stuck in a pending state?
I am not sure if connecting to the PROXY_IP like I have done actually proves that Kong is working as an ingress controller. How do I know if the ingress controller is actually working?

Thank you for your help.

Could I just replace the LoadBalancer service for a NodePort one so that the service is not stuck in a pending state?

It is stuck in pending state because there is no loadBalancer. For local development, you can try metallb. The service itself is running, you can use port-forward to test the service.

How do I know if the ingress controller is actually working?

Maybe you can start by following this doc.

Thank you very much for your reply! I only went as far as the curl -i $PROXY_IP bit and saw that it was working, which threw me off. I’ll try creating an ingress.

The live environment will be in the same situation as the test environment (air-gapped, metal bare). So having the LoadBalancer service as “not pending” would be desirable. Would you know what options I’d have?

You can take a look at MetalLB

Thank you again. What about running Kong as a Daemonset, replacing NGinx? I could access the services directly as they are bound to the host ports I want. Would a LoadBalancer service still be of any use?

I managed to install Kong without the LB service. The steps in my case:
Install Helm
Copy the helm charts from github GitHub - Kong/charts: Helm chart for Kong locally
Install kong with this command line helm install -f [value file] [release name] [chart directory location]
where the value file, in my case looks like this:

namespace: "kong"
deployment:
  daemonset: true
image:
  repository: [PRIVATE REGISTRY]/kong/kong
  tag: "2.5"

ingressController:
  enabled: true
  installCRDs: false
  image:
    repository: [PRIVATE REGISTRY]/kong/kubernetes-ingress-controller
    tag: "1.3"
proxy:
  type: ClusterIP
  http:
    enabled: true
    servicePort: 80
    containerPort: 8000
    hostPort: 80

This created a daemonset and bound port 80 (I am not using NGinx), a similar set of ports can be used for other ports. There was no LoadBalancer service.
I then created ingress (HTTP and TCP) using the examples at Getting started with the Kubernetes Ingress Controller - v1.3.x | Kong Docs