Ingress
Read an Ingress: whether it has a load balancer address, its host and IP, its class, the hosts in its rules and TLS section, and every load balancer address.
Reference
| Function | Description |
|---|---|
ingressClassName | Returns spec.ingressClassName, or "" when not set. |
ingressHost | Returns status.loadBalancer.ingress[0].hostname — cloud providers such as AWS ALB and GCP assign a hostname rather than an IP. |
ingressIP | Returns status.loadBalancer.ingress[0].ip, or "" while the LB is provisioning. |
ingressLoadBalancerIPs | Returns each load balancer address in status.loadBalancer.ingress: its IP, or its hostname when it has no IP. |
ingressReady | Returns true when at least one load-balancer entry has been assigned — either an IP or hostname. |
ingressRules | Returns the hostnames in spec.rules, in order. |
ingressTLSHosts | Returns the distinct TLS hostnames in spec.tls. |
Functions
ingressClassName
ingressClassName returns spec.ingressClassName, or "" when not set.
{{ ingressClassName .ingress }} → "nginx"
ingressHost
ingressHost returns status.loadBalancer.ingress[0].hostname — cloud providers such as AWS ALB and GCP assign a hostname rather than an IP.
{{ ingressHost .ingress }} → "abc123.us-east-1.elb.amazonaws.com"
ingressIP
ingressIP returns status.loadBalancer.ingress[0].ip, or "" while the LB is provisioning.
{{ ingressIP .ingress }} → "34.123.45.67"
ingressLoadBalancerIPs
ingressLoadBalancerIPs returns each load balancer address in status.loadBalancer.ingress: its IP, or its hostname when it has no IP.
{{ ingressLoadBalancerIPs .ingress }} → [34.123.45.67]
ingressReady
ingressReady returns true when at least one load-balancer entry has been assigned — either an IP or hostname.
{{ ingressReady .ingress }} → true
ingressRules
ingressRules returns the hostnames in spec.rules, in order. Empty hosts (catch-all rules) are omitted.
{{ ingressRules .ingress }} → [api.example.com www.example.com]
ingressTLSHosts
ingressTLSHosts returns the distinct TLS hostnames in spec.tls.
{{ ingressTLSHosts .ingress }} → [api.example.com]