简体   繁体   中英

AKS loadbalancer expose different external IP address

Hi i have been deploying and exposing my web api container image using azure-devops to azure kubernetes service (container image ) . i have created multiple applications why each application gets new external IP address ? Is it by default when we use type as load balancer ?

I also tried using node port but in node port case external IP is none.

deployment deployment-name --type=LoadBalancer --port 80 --name=service-name

yep, this behaviour is by default, if you want them all have the same external IP you should use the ingress resource:

Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.

Its a bit of a learning, but its quite mandatory if you want to use kubernetes for anything serious.

https://kubernetes.io/docs/concepts/services-networking/ingress/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM