<p>I have multiple MSA on k8s on GKE. Each is on separate subdomain like:</p>

<ul>
<li>msa1.example.com</li>
<li>msa2.example.com</li>
</ul>

<p>I have it in single ingress:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: main-ingress
  annotations:
    kubernetes.io/ingress.global-static-ip-name: lalala-ip-1
    kubernetes.io/ingress.allow-http: "false"
spec:
  tls:
  - hosts:
    - msa1.example.com
    secretName: msa1-tls
  backend:
    serviceName: sink
    servicePort: 80
  rules:
  - host: msa1.example.com
    http:
      paths:
      - path: /.well-known/*
        backend:
          serviceName: letsencrypt
          servicePort: 80
      - path: /*
        backend:
          serviceName: lalala
          servicePort: 80
  - host: msa2.example.com
    http:
      paths:
      - path: /*
        backend:
          serviceName: lalala2
          servicePort: 80
</code></pre>

<p>... and all is nice. </p>

<p>The thing is, that I want to have each MSA in separate file. </p>

<p>Problem is this <code>kubernetes.io/ingress.global-static-ip-name: lalala-ip-1</code> line. If I have it in two ingresses only first started is bounded to IP, but other ones no. </p>

<p>Is there a way, to share IP on GKE ingress controller between two ingresses? </p>

<p>A way around it could be to run your own nginx-ingress controller in your cluster and expose it via LoadBalancer service type. Then you would have 1 IP for your ingress and be able to serve all ingresses via nginx controller by adding annotation <code>kubernetes.io/ingress.class: "nginx"</code></p>

<p>Reference: <a href="https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/</a></p>
