zzg
zzg

Reputation: 101

The external IP of istio ingress gateway stay pending

I deployed a istio to k8s and it works well at first, but after one day, I can't access the app via ingress gateway. Then checked the istio svc status. It shows the external ip of the istio ingress gateway is pending.

I checked logs and events of the service, but there is nothing. What's the most possibility cause of the issue?

the external ip stay pending:

the external ip stay pending

Upvotes: 9

Views: 16270

Answers (3)

Srinath
Srinath

Reputation: 66

If you are using KIND, then you need to install MetalLB on top of it first. Then, your istio-ingressgateway will get an external IP assigned if it is of type LoadBalancer. Hopefully, this helps.

Upvotes: 0

Piotr Malec
Piotr Malec

Reputation: 3667

This is most likely caused by using platform that does not provide an external loadbalancer to istio ingress gateway.

According to istio documentation:

If the EXTERNAL-IP value is set, your environment has an external load balancer that you can use for the ingress gateway. If the EXTERNAL-IP value is <none> (or perpetually <pending>), your environment does not provide an external load balancer for the ingress gateway. In this case, you can access the gateway using the service’s node port.


Follow these instructions if you have determined that your environment has an external load balancer.

Set the ingress IP and ports:

export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}')
export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].port}')
export TCP_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="tcp")].port}')

In certain environments, the load balancer may be exposed using a host name, instead of an IP address. In this case, the ingress gateway’s EXTERNAL-IP value will not be an IP address, but rather a host name, and the above command will have failed to set the INGRESS_HOST environment variable. Use the following command to correct the INGRESS_HOST value:

export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')

Upvotes: 6

Vahid
Vahid

Reputation: 1417

removing the traefik service resolved my issue on k3d on localhost (dev environment).

kubectl get svc -n kube-system

kubectl -n kube-sytem delete svc traefik 

I'm not an expert! This might have some side effects or cause other issues.

Upvotes: 3

Related Questions