0
votes

I have a 3-node OKE cluster setup in Oracle cloud.

I deployed an nginx ingress controller in the cluster. I'm mapping the FQDN test.myapp.com to the EXTERNAL_IP of that nginx ingress controller service.

Whenever I re-install the ingress controller during the time of testing, it gets different EXTERNAL_IP and I have to map the FQDN again to that new IP.

So it will be better if I can specify a static loadBalancer IP during the time of nginx ingress controller installation. Like this:

nginx-ingress:
  controller:
    service:
      loadBalancerIP: "125.23.119.23"

How can I achieve this in Oracle cloud (with OKE)?

1
Would ExternalDNS help you? github.com/kubernetes-sigs/external-dns#externaldns ExternalDNS allows you to control DNS records dynamically via Kubernetes resources. And from its documentation I see it supports Oracle Cloud Infrastructure DNS. This will help you to not rely on static External_IP and also automate creation/removal of DNS records by monitoring your Service Annotations and/or Ingress Host - rock'n rolla
@rock'nrolla But it seems that it doesn't support my service provider. What I would need is something like this for oracle : docs.microsoft.com/en-us/azure/aks/… ( This is in azure cloud ). - AnjanaDyna
I might not be thinking straight but what happens if you use a pre-reserved IP (like ElasticIP in AWS) in the loadBalancerIP of the nginx controller service - just like you mentioned. I see nginx ingress helm chart allows this : github.com/helm/charts/blob/master/stable/nginx-ingress/… Does the LB which gets created not uses this IP? - rock'n rolla
@rock'nrolla I tried to set a loadBalancerIP for a sample service. But the externalIP remained <pending>. And there was error Error syncing load balancer: failed to ensure load balancer: invalid service: OCI does not support setting LoadBalancerIP. That means it is not possible? - AnjanaDyna

1 Answers

0
votes

Please ensure you install nginx ingress controller using helm chart https://kubernetes.github.io/ingress-nginx/deploy/#using-helm

Please make sure that your Ingress Controller runs as a DaemonSet only on the Infra Nodes of your Openshift Cluster using helm chart values.

Then create an Oracle Cloud Load Balancer to point to the NodePort of the Infra Nodes on which Ingress Controller Service is listening on.

This is the way that OpenShift Router works.