Return Custom Response Headers with Kubernetes Ingress

kubernetes
2024-02-23 12:38 (9 months ago) ytyng

How to Return Custom Response Headers with Nginx Ingress in Kubernetes

This is useful when you want to check which Ingress is responding among multiple Ingresses.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ...
  namespace: ...
  annotations:
    nginx.ingress.kubernetes.io/configuration-snippet: |
      more_set_headers "X-Ingress-Name: my-awesome-ingress";
      more_set_headers "X-Other-header: other-header";
spec:
Currently unrated

Comments

Archive

2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011