37 lines
994 B
YAML
37 lines
994 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: grafana
|
|
namespace: default
|
|
annotations:
|
|
# 1. Enable cert-manager for automatic TLS
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
|
|
# 2. NGINX Annotation for the specific ingress class
|
|
kubernetes.io/ingress.class: "nginx"
|
|
|
|
# 3. Optional: Ensures large requests/responses for dashboard data work smoothly
|
|
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
|
|
|
|
spec:
|
|
ingressClassName: nginx
|
|
|
|
# TLS configuration
|
|
tls:
|
|
- hosts:
|
|
- grafana.sebastians-co.de
|
|
secretName: grafana-tls # cert-manager will create and manage this secret
|
|
|
|
# Routing rules
|
|
rules:
|
|
- host: grafana.sebastians-co.de
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: grafana # Name of the Service above
|
|
port:
|
|
number: 80 # The port the Service exposes (targetPort 3000)
|