Created
November 22, 2021 12:08
-
-
Save Finkes/87656fcfb2478e4043a6327c29d9b81e to your computer and use it in GitHub Desktop.
Debug headers inside a kubernetes cluster behind a nginx ingress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: debug-headers | |
namespace: your-namespace | |
labels: | |
app: debug-headers | |
spec: | |
selector: | |
matchLabels: | |
app: debug-headers | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: debug-headers | |
spec: | |
containers: | |
- image: mendhak/http-https-echo | |
name: debug-headers | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: debug-headers | |
namespace: your-namespace | |
spec: | |
type: ClusterIP | |
selector: | |
app: debug-headers | |
ports: | |
- name: http | |
port: 80 | |
protocol: TCP | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: debug-headers | |
namespace: open-source-tool | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
spec: | |
tls: | |
- secretName: internal-tls-certs | |
hosts: | |
- my.domain | |
rules: | |
- host: my.domain | |
http: | |
paths: | |
- pathType: Prefix | |
path: "/" | |
backend: | |
service: | |
name: debug-headers | |
port: | |
name: http |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment