Kubernetes manifests · Services and Ingress
Ingress with TLS
Route a host name to a Service and terminate TLS with a certificate Secret.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web
spec:
ingressClassName: nginx
tls:
- hosts: [www.example.com]
secretName: web-tls
rules:
- host: www.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web
port:
number: 80
Official Kubernetes manifests documentation
More services and ingress commands
All services and ingress commands · Kubernetes manifests cheatsheet