What is an Ingress?
An ingress is a Kubernetes resource that:- Maps custom domains to your services
- Terminates TLS/HTTPS traffic
- Routes requests based on URL paths
- Provides a single entry point for HTTP traffic
When to Use Ingresses
Use Ingresses For
- Custom domains (api.example.com)
- HTTPS with auto-certificates
- Path-based routing (/api, /admin)
- Multiple services behind one domain
Use External Services For
- Direct IP access without domain
- Non-HTTP protocols (databases, gRPC)
- Quick testing without DNS setup
Creating an Ingress
Configure the ingress
| Field | Description | Example |
|---|---|---|
| Host | Your custom domain | api.example.com |
| Path | URL path to match | / or /api |
| Service | Target service name | api-server |
| Port | Target service port | 8080 |
| TLS | Enable HTTPS | true |
DNS Configuration
Before your ingress works, you need to point your domain to the cluster:Create a DNS record
Add an A record in your DNS provider:
Or for the root domain:
| Type | Name | Value |
|---|---|---|
| A | api | <cluster-ip> |
| Type | Name | Value |
|---|---|---|
| A | @ | <cluster-ip> |
DNS Validation
Orchard can validate that your DNS is configured correctly:TLS/HTTPS Configuration
Automatic Certificates
Orchard integrates with cert-manager to automatically provision and renew TLS certificates:Automatic certificates require your DNS to be correctly configured before the certificate can be issued. The domain must resolve to the cluster IP.
Certificate Status
After enabling TLS, the certificate goes through these stages:- Pending: Certificate request submitted
- Issuing: Certificate authority is validating
- Ready: Certificate installed and active
Path-Based Routing
You can route different paths to different services:Path Types
| Type | Description | Example Match |
|---|---|---|
| Prefix | Matches path and all subpaths | /api matches /api, /api/users, /api/v1/users |
| Exact | Matches exact path only | /api matches only /api |
Creating Multiple Paths
For each path, create a separate ingress rule or configure multiple paths in one ingress:Multiple Domains
To serve the same application on multiple domains:- Same service
- Different services
Create multiple ingresses pointing to the same service:
example.com→ api-server:8080www.example.com→ api-server:8080api.example.com→ api-server:8080
Ingress Annotations
For advanced configuration, you can add Kubernetes annotations:| Annotation | Purpose |
|---|---|
cert-manager.io/cluster-issuer | Specify certificate issuer |
nginx.ingress.kubernetes.io/rewrite-target | Rewrite URL paths |
nginx.ingress.kubernetes.io/ssl-redirect | Force HTTPS redirect |
Available annotations depend on your ingress controller. Contact your administrator for supported annotations.
Updating Ingresses
To modify an existing ingress:Deleting Ingresses
Best Practices
Always use HTTPS
Always use HTTPS
Enable TLS for all production ingresses. HTTP traffic can be intercepted and modified.
Use www redirect
Use www redirect
Redirect www to non-www (or vice versa) for consistency. Configure one as the canonical URL.
Set up DNS before creating ingress
Set up DNS before creating ingress
Configure DNS first to avoid certificate issuance delays.
Monitor certificate expiry
Monitor certificate expiry
While certificates auto-renew, monitor for renewal failures to avoid unexpected expiry.
Troubleshooting
Domain not working
Domain not working
If your domain doesn’t reach your service:
- Verify DNS is pointing to the cluster IP
- Check the ingress status in Orchard
- Ensure the target service exists and has healthy pods
- Wait for DNS propagation (up to 48 hours)
Certificate not issued
Certificate not issued
If TLS certificate stays pending:
- Verify DNS is correctly configured
- Check that port 80 is accessible for HTTP-01 challenge
- Review certificate status for error messages
- Try deleting and recreating the ingress
HTTPS redirect not working
HTTPS redirect not working
If HTTP doesn’t redirect to HTTPS:
- Verify TLS is enabled on the ingress
- Check for ssl-redirect annotation
- Clear browser cache and try again
Path routing incorrect
Path routing incorrect
If requests go to the wrong service:
- Check path priority (more specific paths should be first)
- Verify path type (Prefix vs Exact)
- Review all ingress rules for the same host