Kubernete Ingress Controller for Kong 0.14.1 + Cassandra

All

I am trying to add Kubernetes Ingress Controller for Kong 0.14.1) using Cassandra as DB. What concepts should I known before going this path, and is there a plan to provide support for 0.14.1. All the article point to using 0.13.X for best results but I cannot get cassandra working with anything older than 0.14.1.

The deployment succeeds but I do not see Ingress Controller.
Appreciate any help. NOTE: I have used Kong 0.14.1.

Here are the additional lines added to my Kong Values.yaml:

Kong Ingress Controller’s primary purpose is to satisfy Ingress resources

created in k8s. It uses CRDs for more fine grained control over routing and

for Kong specific configuration.

ingressController:
enabled: true
image:
repository: kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller
tag: 0.1.0
replicaCount: 1
livenessProbe:
failureThreshold: 3
httpGet:
path: “/healthz”
port: 10254
scheme: HTTP
initialDelaySeconds: 180
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: “/healthz”
port: 10254
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1

Thanks

Chandra

Hello @chandrasrt,

Happy to see that you are trying to use Kong Ingress Controller with Cassandra.
Kong Ingress Controller currently doesn’t support Kong 0.14.1. The support for 0.14.1 is ready but not yet released. Stay tuned for more updates on that. Meanwhile, you can use Kong 0.13.x for your use.

Regarding, controller not coming up, could you share (Github Gist, etc) the deployment that you used to deploy Cassandra, Kong in data plane mode and control-plane pod? Could you share any logs that might help us resolve this issue?

Hi we decided to use postgre to move on with db…

Now I have a question specifically for how to make this ingress controller work…here are steps:

  1. Deploy the kong ingress controller chart using helm which deployed kong ingress controller, king proxy and kong-admin
  2. Write an ingress rule
  3. use curl to test via the kong proxy port with the path.

After step 3, here is the result:
curl KONG_PROXY_IP:31027
{“message”:“no route and no API found with those values”}

Why is this? Isnt it enough to write Ingress rule? How does Kong Proxt communicate with kong Ingress controller?

Please let me know if you need any additional information.

Chandra

Hello @chandrasrt,

The Helm chart for Kong doesn’t deploy Kong as an Ingress Controller but as an application on Kubernetes.
There is a PR in works to support this use case in future.
Meanwhile, you can deploy Kong for your k8s Ingress using our Deployment files.

It seems like you’ve not read our docs and I would encourage you to go through them and try out the getting started guide:

I’d be happy to answer any specific questions you may come across.

hi

Yes I have gone through the minikube training, and decided we needed Kong Ingress Controller. Hence did the following:

  1. Deployed Kong Ingress controller in its own name space “Kong” using https://github.com/Kong/kubernetes-ingress-controller/blob/master/deploy/single/all-in-one-postgres.yaml

  2. Then wrote the ingress rule for Kong in this name space -
    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
    name: ocnrf-ingress
    spec:
    rules:

Now this Service 1 is sitting in a different name space as Kong

Kong Ingress Controller is complaining:
W0912 17:17:05.473216 7 kong.go:218] the service defined in the ingress kong/ocnrf-ingress does not exists
W0912 17:17:05.478117 7 kong.go:620] the service defined in the ingress kong/ocnrf-ingress does not exists

How do we tell Kong Ingress about service path to a service sitting in different name space? do we need additional configuration? The serivce1 is using NodePort type of service…

Please let me know if I am missing something or is it something to do with our internal kubernetes networking?

Chandra

hbagdi

I have updated the host as ‘kong-proxy’ in my ingress rule and I still get 404 back from proxy…it seems like my proxy is not able to hook to the Ingress rule and forward to Service in the back end…

Kindly let me know what else to check …

Chandra

Hello @chandrasrt,

You’re creating an Ingress in the default namespace while the service (Service1) is present in the different namespace.

Please create the Ingress rule in the same namespace as your service and then the Ingress controller will pick apply the routing rule properly.

    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      name: ocnrf-ingress
      namespace:<same as your Service1>
    spec:
    rules:
    - host: nrfregistration.oracle.com
      http:
       paths:
       - path: /abc/def/ghi
         backend:
         serviceName: Service1
         servicePort: 32034

The docs around this seem to be missing in our repository, please feel free to create a Pull Request. : )

Yep…and still see the communication issue between proxy and ingress controller…
Is there any debugging steps/ troubleshooting info?

Also Helm charts sound good… is this developer version: https://github.com/merqurio/charts/tree/kong-ingress-controller okay to use?

Please share any info on when this would be official…

Thanks

Chandra

Hello @hbagdi

I found from the minikube and other sites and added the following to make it work:
curl http://10.75.216.115:31435/nnrf-nfm/v1/nf-instances -H “Host:csr-kong-proxy”

Is this the way this is supposed to work, do i need to explicitly state the host that I put in my Ingress Rule?

How do we expose this host name to other services?

Chandra

@hbagdi : Please close this ticket. I am good!

Thanks a lot help.

Chandra

Hello @chandrasrt

In the spirit of helping other community members, could you share the solution that worked for your problem and then mark this post as “Solved”. Thanks in advance!

Resolution:

Fixes:
a. Include host in ingress rules.
b. Set the proxy port to accept connection on port 80
c. Add the rules as mentioned:
d. make the Kong Ingress controller and Kong to be deployed as infrastructure service rather than tying to individual clusters.

Potentially will work on Kong Ingress Controller 0.2.0 and get it working with Kong 0.14.1. Will keep the team posted.

Chandra