When configuring TLS for an Ingress resource, you control the first handshake between your users and your application. Missteps here leak performance, trust, and data.
The core of a proper Ingress TLS configuration is simple: terminate HTTPS at the edge, enforce strong ciphers, and use certificates that are trusted, fresh, and automated. The details, however, are where security wins or collapses.
Define TLS in the Ingress manifest
The spec.tls block maps a certificate and key to one or more hostnames. Each hostname should be exact—no guessing by the browser. Use a wildcard only when it’s a firm architectural choice.
Example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
spec:
tls:
- hosts:
- app.example.com
secretName: example-tls
rules:
- host: app.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
Secure the certificate lifecycle
Self-signed certificates in production are a red flag. Automate issuance and renewal with a controller like cert-manager. Leverage ACME for Let’s Encrypt or connect to your enterprise CA. Aim for short-lived certificates to reduce exposure.