apiVersion: apps/v1 kind: Deployment metadata: name: loki namespace: observability labels: app.kubernetes.io/name: loki app.kubernetes.io/component: logs app.kubernetes.io/part-of: observability spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: loki template: metadata: labels: app: loki app.kubernetes.io/name: loki app.kubernetes.io/component: logs app.kubernetes.io/part-of: observability annotations: prometheus.io/scrape: "true" prometheus.io/port: "3100" spec: securityContext: runAsUser: 10001 runAsGroup: 10001 fsGroup: 10001 containers: - name: loki image: grafana/loki:3.7.6 args: - -config.file=/etc/loki/loki.yaml - -target=all ports: - name: http containerPort: 3100 - name: grpc containerPort: 9096 resources: requests: cpu: 100m memory: 256Mi limits: cpu: "2" memory: 1Gi readinessProbe: httpGet: path: /ready port: http initialDelaySeconds: 30 periodSeconds: 10 livenessProbe: httpGet: path: /ready port: http initialDelaySeconds: 60 periodSeconds: 30 volumeMounts: - name: config mountPath: /etc/loki - name: data mountPath: /loki volumes: - name: config configMap: name: loki-config - name: data persistentVolumeClaim: claimName: loki-data