homelab/archive/2022.07.bxl-k3s-pi/utils/monitoring/grafana/grafana-service.yaml

42 lines
752 B
YAML

apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: monitoring
spec:
type: ClusterIP
ports:
- name: grafana-ui
port: 3000
protocol: TCP
selector:
app: grafana
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: grafana
namespace: monitoring
annotations:
cert-manager.io/cluster-issuer: "bhasherca-k3s-issuer"
cert-manager.io/common-name: "monitoring.bhasher.com"
spec:
ingressClassName: "nginx"
tls:
- hosts:
- monitoring.bhasher.com
secretName: grafana-tls
rules:
- host: monitoring.bhasher.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: grafana
port:
number: 3000