apiVersion: apps/v1 kind: Deployment metadata: name: grafana-deployment labels: app: grafana spec: replicas: 1 selector: matchLabels: app: grafana template: metadata: labels: app: grafana spec: containers: - name: grafana image: grafana/grafana imagePullPolicy: IfNotPresent volumeMounts: - name: grafana-config mountPath: /etc/grafana/grafana.ini subPath: grafana.ini env: - name: GF_SERVER_ROOT_URL value: /grafana - name: GF_SERVER_SERVE_FROM_SUB_PATH value: "true" ports: - containerPort: 3000 name: http-grafana protocol: TCP readinessProbe: failureThreshold: 3 httpGet: path: /robots.txt port: 3000 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 30 successThreshold: 1 timeoutSeconds: 2 livenessProbe: failureThreshold: 3 initialDelaySeconds: 30 periodSeconds: 10 successThreshold: 1 tcpSocket: port: 3000 timeoutSeconds: 1 resources: requests: cpu: 250m memory: 100Mi volumeMounts: - mountPath: /var/lib/grafana name: grafana-data volumes: - name: grafana-config configMap: name: grafana-configmap - name: grafana-data persistentVolumeClaim: claimName: pvc-grafana