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

**URL:** <https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189>\
**Category:** Misc\
**Created:** [January 13, 2025, 9:08am UTC](https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189 "2025-01-13T09:08:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanuel.mesa](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@emmanuel.mesa](https://forum.airlock.com/u/emmanuel.mesa)\
**Post date:** [January 13, 2025, 9:08am UTC](https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189/1 "2025-01-13T09:08:59Z")

</div>

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

```auto
---

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:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![dieti](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@dieti](https://forum.airlock.com/u/dieti)\
**Post date:** [January 14, 2025, 8:01am UTC](https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189/2 "2025-01-14T08:01:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emmanuel.mesa](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@emmanuel.mesa](https://forum.airlock.com/u/emmanuel.mesa)\
**Post date:** [January 14, 2025, 12:41pm UTC](https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189/3 "2025-01-14T12:41:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dieti](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@dieti](https://forum.airlock.com/u/dieti)\
**Post date:** [January 14, 2025, 7:05pm UTC](https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189/4 "2025-01-14T19:05:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dieti](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@dieti](https://forum.airlock.com/u/dieti)\
**Post date:** [January 17, 2025, 12:28pm UTC](https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189/5 "2025-01-17T12:28:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emmanuel.mesa](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@emmanuel.mesa](https://forum.airlock.com/u/emmanuel.mesa)\
**Post date:** [March 17, 2025, 2:37pm UTC](https://forum.airlock.com/t/not-able-to-specify-one-static-ip-in-gateway-object-when-using-microgateway-controller/189/6 "2025-03-17T14:37:38Z")

</div>

Hello Dieti,

We we have normal http service without tls termination and We don’t need to care about X-Forwarded-For.

Best regards  
Emmanuel
