When the Kong service is outside the kubernetes cluster, it cannot reach the endpoints using pod IPs. I have an idea for this case:
The service can have type NodePort. This opens a port 3xxxx on each node of the kubernetes cluster.
For the endpoint list, we use : where IP is the node IP, and port is the 3xxxx port.
This deployment may sound weird. It’s useful in a few cases. I have a few examples:
While the kubernetes cluster is using IPv4, and the services should be reached by IPv6 clients. In this case, we can run Kong in an IPv4/IPv6 dual stack server outside the kubernetes cluster, and ask the ingress controller to set up the routes.
While the kubernetes cluster does not have LoadBalancer available, and the service is required to work on a fixed port. We may consider deploying an external API gateway.
The use cases are indeed valid.
While it would be possible to change Ingress Controller to only populate routes and services and skip configuring upstreams and targets, how would you a user go about configuring upstreams and targets?
Have you considered using Kong’s native declarative configuration or other configuration tool to configure Kong, since it’s running outside your k8s cluster?
src/github.com/kong/kubernetes-ingress-controller/internal/ingress/status/status.go:105:15: not enough arguments in call to s.elector.Run
have ()
want (context.Context)
src/github.com/kong/kubernetes-ingress-controller/internal/ingress/status/status.go:201:3: cannot use func literal (type func(<-chan struct {})) as type func(context.Context) in field value