Can't get External IP when I use loadbalancerIPin GKE

-> Create a kubernetes cluster in GKE.
-> Installed Traefik v2.3.3 with traefik service as LoadBalancer with loadbalancerIP: {static-ip-addres}from GCP.

-> When I do kubectl -n traefik get svc traefik, I see the EXTERNAL-IP as pending.

-> Trarfik SVC

  externalTrafficPolicy: Cluster
  - name: web
    nodePort: 32552
    port: 80
    protocol: TCP
    targetPort: web
  - name: websecure
    nodePort: 30499
    port: 443
    protocol: TCP
    targetPort: websecure
  selector: traefik traefik
  sessionAffinity: None
  type: LoadBalancer
  loadBalancer: {}

Is this the right behaviour.

I have some other doubts.

Now, if I create an ingress for my deployment, it doesn't work

  - host:
      - backend:
          serviceName: epinio-server
          servicePort: 80
        path: /
        pathType: ImplementationSpecific
  loadBalancer: {}

My {static-ip} points to

Traefik version - v2.3.3
GKE : 1.19.10-gke.1600

The external IP only available after the service is created, refer to docs. In other word, you do not have to specify loadBalancerIP. If you want to reserve an IP, can reserve it after service creation.

Hey @WLun001 thanks for the reply. I have a static IP address bind to a domain name and I would like to use that particular IP address.

Why does it not work with loadBalancerIP field ? The loadbalancer should get the IP specified in this field right ? according to this doc

@rohitsakala yeah I understand. You can bind and reserved the static IP after it generated. Load Balancer is cloud vendor specific.

From docs

Some cloud providers allow you to specify the loadBalancerIP . In those cases, the load-balancer is created with the user-specified loadBalancerIP . If the loadBalancerIP field is not specified, the loadBalancer is set up with an ephemeral IP address. If you specify a loadBalancerIP but your cloud provider does not support the feature, the loadbalancerIP field that you set is ignored.

Therefore, should refer to Google Cloud docs that I sent on previous reply, in this case.

Hello @WLun001 ,

I was using --globalstatic IP address and so it didn't work. I used regiaonalIP address static where my kubernetes cluster is located and it worked. Seems like for services of type LoadBalancer in GKE, support only regional IP addresses.

1 Like

@rohitsakala Seems like global static IP only supported with GKE ingress