Files

32 lines
630 B
YAML

---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: ingress-with-custom-headers
namespace: default
annotations:
nginx.ingress.kubernetes.io/custom-headers: default/custom-headers-configmap
spec:
ingressClassName: nginx
rules:
- host: whoami.localhost
http:
paths:
- path: /
pathType: Exact
backend:
service:
name: whoami
port:
number: 80
---
kind: ConfigMap
apiVersion: v1
metadata:
name: custom-headers-configmap
namespace: default
data:
X-Custom-Header: "some-random-string"