Not able to specify one static ip in Gateway object when using microgateway controller

I would like to tell to Gateway object to create a service of type loadBalancer with a static ip, using the below yaml:

---

apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: airlock-microgateway
spec:
  controllerName: microgateway.airlock.com/gatewayclass-controller
  description: This is an example GatewayClass.
---

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: gateway-microwaf
  namespace: kube-system
spec:
  addresses:
  - type: IPAddress
    value: 10.20.31.100
  gatewayClassName: airlock-microgateway
  listeners:
  - allowedRoutes:
      namespaces:
        from: All
    name: http-gateway
    port: 8080
    protocol: HTTP

But this fails with the following error:

Status:
  Conditions:
    Last Transition Time:  2025-01-08T08:09:04Z
    Message:               Gateway must not specify any address. An internal address will be assigned automatically.
    Observed Generation:   1
    Reason:                UnsupportedAddress
    Status:                False
    Type:                  Accepted

Hi Emmanuel

Microgateway version 4.4 supports only service type ClusterIP which cannot be configured. Version 4.5 will have the possibility to configure the service type ClusterIP, NodePort or LoadBalancer. It should work on EKS and GKE with dynamic IPs provided by the LoadBalancer.

We did not plan to implement the “static ip address” feature in version 4.5. Because of your request we are looking whether we can bring that feature in 4.5 or not.

Could you please tell me what platform (GKE, EKS, …) and which LoadBalancer you are using? That would help us to develop the mentioned feature.

Cheers
Stefan

Thanks Stefan for your answer,

At the moment, We are using cilium that give us the ability to allocate static ip address for the k8s service, Having the option to specify type: LoadBalancer it will be enough for us.

Best regards
Emmanuel

1 Like

Hi Emmanuel

Thank you for your reply. Great. So, I assume that your setup works as desired with version 4.5. We have planned to release Microgateway 4.5 at the beginning of February.

Cheers
Stefan

Hi Emmanuel

In our today’s standup we had another question about the setup you are using.

Service type LoadBalancer should be possible with Microgateway 4.5. Could you say more about the network setup? Does the Microgateway see the real client IP or is a LoadBalancer in front which terminates TLS and injects the X-Forwarded-For header?

Cheers
Stefan