aenix-io / cozystack

Free and Open Source PaaS-platform for seamless management of virtual machines, managed Kubernetes, and Databases-as-a-Service
https://cozystack.io
Apache License 2.0
795 stars 45 forks source link

Provide an opportunity to use single nginx-ingress-controller across all the nodes of the cluster #158

Closed kvaps closed 3 months ago

kvaps commented 4 months ago

In this configuration all the nodes can be exposed as separate loadBalancer services with external IPs, eg in addition to root-ingress-controller we can create a few more:

apiVersion: v1
kind: Service
metadata:
  name: root-ingress-controller-2
  namespace: tenant-root
spec:
  loadBalancerIP: 1.2.3.2 # node 2
  ports:
  - appProtocol: http
    name: http
    port: 80
    targetPort: http
  - appProtocol: https
    name: https
    port: 443
    targetPort: https
  selector:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: ingress-nginx
    app.kubernetes.io/name: ingress-nginx
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  name: root-ingress-controller-3
  namespace: tenant-root
spec:
  loadBalancerIP: 1.2.3.3 # node 3
  ports:
  - appProtocol: http
    name: http
    port: 80
    targetPort: http
  - appProtocol: https
    name: https
    port: 443
    targetPort: https
  selector:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: ingress-nginx
    app.kubernetes.io/name: ingress-nginx
  type: LoadBalancer