I deploy grafana with helm, I enable ingress forwarding, the generated resources are as below, but when I visit https://control.xx/grafana it returns 404.
I don’t know how to solve this problem
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
meta.helm.sh/release-name: grafana
meta.helm.sh/release-namespace: monitoring
nginx.ingress.kubernetes.io/backend-protocol: HTTP
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
name: grafana
namespace: monitoring
spec:
ingressClassName: monitoring-nginx
rules:
- host: control.xx
http:
paths:
- backend:
service:
name: grafana
port:
number: 80
path: /grafana
pathType: Prefix
tls:
- hosts:
- control.xx
secretName: monitoring-ingress-secret
The values file is as follows
persistence:
type: pvc
enabled: true
storageClassName: cbs-yield
accessModes:
- ReadWriteOnce
size: 20Gi
existingClaim: grafana #tke事先创建好的pvc
ingress:
enabled: true
ingressClassName: monitoring-nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
path: /grafana
pathType: Prefix
hosts:
- control.xx
tls:
- secretName: monitoring-ingress-secret
hosts:
- control.xx
resources:
limits:
cpu: 300m
memory: 500Mi
requests:
cpu: 100m
memory: 128Mi