For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/kubernetes-service-with-external-load-balancer.md.
A documentation index is available at /llms.txt.
This Service uses a LoadBalancer and therefore creates an external load balancer, which may allow access from other networks and the internet. Annotations must be set to indicate an internal load balancer for supported cloud providers (for example, networking.gke.io/load-balancer-type=Internal, cloud.google.com/load-balancer-type=Internal, service.beta.kubernetes.io/aws-load-balancer-internal=true, service.beta.kubernetes.io/azure-load-balancer-internal=true) to avoid external exposure.