Key Concepts
Ingress
A resource that defines rules for routing external HTTP/HTTPS traffic to services.
Ingress Controller
A controller (like NGINX, Traefik) that implements the Ingress rules.
Ingress Class
Specifies which controller should handle the Ingress.
TLS/SSL
Configuration for HTTPS termination using certificates stored in Secrets.
Required Permissions
| Action | Permission |
|---|---|
| View ingresses | iam:project:infrastructure:kubernetes:read |
| Create ingress | iam:project:infrastructure:kubernetes:write |
| Edit ingress | iam:project:infrastructure:kubernetes:write |
| Delete ingress | iam:project:infrastructure:kubernetes:delete |
Ingress Status Values
| Status | Description |
|---|---|
| Active | Load balancer IP or hostname has been assigned |
| Pending | Waiting for load balancer address assignment |
Status is determined by the presence of a load balancer address. An Ingress with no assigned address shows as Pending until the Ingress controller provisions it.
How to View Ingresses
How to View Ingress Details
Review Details
View comprehensive ingress information including:
- Overview: Name, namespace, status, ingress class, age
- Address: Load balancer IP or hostname
- Rules: Host-based routing with paths and backend services
- TLS: SSL/TLS configuration with secret references
- Default Backend: Fallback service for unmatched requests
- Labels & Annotations: Metadata and controller-specific settings
- Events: Recent events from the ingress controller
How to Create an Ingress
Write YAML
Enter the Ingress manifest in YAML format. Key fields:
spec.ingressClassName- Which ingress controller to usespec.rules- Host and path routing rulesspec.tls- TLS/SSL configuration
How to Edit an Ingress
Modify Spec
Edit the ingress specification. Common changes:
- Add or modify routing rules
- Update TLS configuration
- Change backend services
- Add controller-specific annotations
How to Delete an Ingress
Routing Rules
Ingress rules define how traffic is routed based on host and path:| Field | Description |
|---|---|
| host | Domain name for the rule (e.g., api.example.com) |
| path | URL path to match (e.g., /api, /v1) |
| pathType | How path matching works: Prefix, Exact, or ImplementationSpecific |
| backend | Target service and port for matched requests |
Path Types
| Type | Description |
|---|---|
| Prefix | Matches URL paths that begin with the specified path |
| Exact | Matches the exact URL path only |
| ImplementationSpecific | Matching behavior depends on the ingress controller |
TLS Configuration
TLS enables HTTPS for your ingress:| Field | Description |
|---|---|
| hosts | Domains that use this TLS certificate |
| secretName | Kubernetes Secret containing the TLS certificate and key |
The Secret must contain
tls.crt (certificate) and tls.key (private key) fields. Use kubectl create secret tls to create it from certificate files.Common Annotations
Annotations configure controller-specific behavior. Examples for NGINX Ingress Controller:| Annotation | Description |
|---|---|
nginx.ingress.kubernetes.io/rewrite-target | Rewrite the URL path |
nginx.ingress.kubernetes.io/ssl-redirect | Force HTTPS redirect |
nginx.ingress.kubernetes.io/proxy-body-size | Maximum request body size |
nginx.ingress.kubernetes.io/proxy-connect-timeout | Backend connection timeout |
nginx.ingress.kubernetes.io/affinity | Enable session affinity |
Troubleshooting
Ingress stuck in Pending status
Ingress stuck in Pending status
- Verify an Ingress Controller is installed and running
- Check the ingress controller pods for errors
- Verify the
ingressClassNamematches your controller - Review ingress events for provisioning errors
503 Service Unavailable
503 Service Unavailable
404 Not Found
404 Not Found
- Check host header matches the ingress rule
- Verify path matches the configured pathType
- Test without host to check default backend
- Review ingress controller logs
TLS/SSL not working
TLS/SSL not working
- Verify the TLS secret exists in the same namespace
- Check secret has
tls.crtandtls.keyfields - Ensure hosts in TLS config match the rules
- Verify certificate is valid and not expired
Ingress address not assigned
Ingress address not assigned
- Check ingress controller has external IP or LoadBalancer
- Verify cloud provider integration for LoadBalancer services
- For bare metal, check MetalLB or similar is configured
- Review ingress controller service status
Changes not taking effect
Changes not taking effect
- Ingress controllers may cache configurations
- Check ingress controller logs for reload events
- Verify the ingress resource was actually updated
- Some changes may require controller restart
Wrong backend being selected
Wrong backend being selected
- Check path specificity - more specific paths should be listed first
- Verify pathType matches your routing needs
- Check for conflicting ingress rules
- Review controller-specific path matching behavior
FAQ
Do I need an Ingress Controller?
Do I need an Ingress Controller?
Yes. Ingress resources alone don’t do anything. You need an Ingress Controller (NGINX, Traefik, etc.) to implement the routing rules. The controller watches for Ingress resources and configures the underlying load balancer.
What's the difference between Ingress and LoadBalancer Service?
What's the difference between Ingress and LoadBalancer Service?
LoadBalancer exposes a single service on a dedicated IP. Ingress can route to multiple services based on host/path, use a single IP for multiple domains, and provides features like SSL termination and path-based routing.
Can I use multiple Ingress Controllers?
Can I use multiple Ingress Controllers?
Yes. Use
ingressClassName to specify which controller handles each Ingress. This allows different controllers for different use cases (e.g., internal vs external traffic).How do I enable HTTPS?
How do I enable HTTPS?
Add a
tls section with your hosts and a Secret containing the certificate. The controller handles SSL termination. For automatic certificates, consider cert-manager with Let’s Encrypt.What is the default backend?
What is the default backend?
The default backend handles requests that don’t match any rule. It’s optional but useful for returning custom 404 pages or catching misrouted traffic.
How do I route based on path?
How do I route based on path?
Define multiple paths in your rules. Use
pathType: Prefix for prefix matching (e.g., /api matches /api/users) or pathType: Exact for exact path matching.Can I use the same host in multiple Ingresses?
Can I use the same host in multiple Ingresses?
Yes, but behavior depends on the controller. Most controllers merge rules from multiple Ingresses for the same host. Be careful to avoid conflicting paths.
How do I redirect HTTP to HTTPS?
How do I redirect HTTP to HTTPS?
Use controller-specific annotations. For NGINX:
nginx.ingress.kubernetes.io/ssl-redirect: "true". Most controllers support automatic HTTP to HTTPS redirection.What happens if the backend service is unavailable?
What happens if the backend service is unavailable?