diff --git a/scripts/kubernetes/README.md b/scripts/kubernetes/README.md new file mode 100644 index 00000000..c012db42 --- /dev/null +++ b/scripts/kubernetes/README.md @@ -0,0 +1,3 @@ +# K8s deployment scripts for Bassa + +This folder container K8s scripts for Bassa deployment on a single node cluster. If you are looking out to use container based deployment infrastructure with K8s orchestration tool, then these configurations will surely help you get started for your own infra. diff --git a/scripts/kubernetes/images/img1.png b/scripts/kubernetes/images/img1.png new file mode 100644 index 00000000..7ddd8442 Binary files /dev/null and b/scripts/kubernetes/images/img1.png differ diff --git a/scripts/kubernetes/images/img2.png b/scripts/kubernetes/images/img2.png new file mode 100644 index 00000000..14d64a93 Binary files /dev/null and b/scripts/kubernetes/images/img2.png differ diff --git a/scripts/kubernetes/manifests/web/ingress.yml b/scripts/kubernetes/manifests/ingress/ingress.yml similarity index 51% rename from scripts/kubernetes/manifests/web/ingress.yml rename to scripts/kubernetes/manifests/ingress/ingress.yml index 06f2f32d..6df188c1 100644 --- a/scripts/kubernetes/manifests/web/ingress.yml +++ b/scripts/kubernetes/manifests/ingress/ingress.yml @@ -1,7 +1,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: web-ingress + name: bassa-ingress namespace: bassa spec: rules: @@ -14,4 +14,12 @@ spec: - path: /api/ backend: serviceName: api - servicePort: 5000 \ No newline at end of file + servicePort: 5000 + - path: /prom + backend: + serviceName: prometheus + servicePort: 8080 + - path: /grafana + backend: + serviceName: grafana + servicePort: 3000 diff --git a/scripts/kubernetes/manifests/monitoring/grafana-visualizer/.gitkeep b/scripts/kubernetes/manifests/monitoring/grafana-visualizer/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/scripts/kubernetes/manifests/monitoring/grafana-visualizer/README.md b/scripts/kubernetes/manifests/monitoring/grafana-visualizer/README.md new file mode 100644 index 00000000..c3385f20 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/grafana-visualizer/README.md @@ -0,0 +1,31 @@ +## Installation + +We will use Helm to deploy Grafana Dashboard on to our K8s cluster. You need to have both Helm server and client installed on your machine. Please move to helm folder for applying required configurations to our k8s cluster. + +We have defined Prometheus as data source for Grafana in `configMap.yaml` file. The file `getDataSources.yaml` overrides the defaults provided by Helm and uses our `configMap.yaml` for data source. + +``` +$ helm install stable/grafana \ + -f monitoring/grafana/values.yml \ + --namespace bassa-monitoring \ + --name grafana +``` + +Once all the required scripts are applied, we shall retrieve the password for Grafana by using the below command +``` +$ kubectl get secret \ + --namespace bassa-monitoring \ + grafana \ + -o jsonpath="{.data.admin-password}" \ + | base64 --decode ; echo +``` +Let's port-forward to access Grafana on our machine. + +``` +$ export POD_NAME=$(kubectl get pods --namespace bassa-monitoring -l "app=grafana,release=grafana" -o jsonpath="{.items[0].metadata.name}") +$ kubectl --namespace bassa-monitoring port-forward $POD_NAME 3000 +``` +Now finally lets add a dashboard to visualize our metrics + +Use `1860` as dashboard ID anyways you may use any other dashboard ID. +Select the data source on dashboard and you should see the metrics \ No newline at end of file diff --git a/scripts/kubernetes/manifests/monitoring/grafana-visualizer/configMap.yaml b/scripts/kubernetes/manifests/monitoring/grafana-visualizer/configMap.yaml new file mode 100644 index 00000000..d2f1dd4b --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/grafana-visualizer/configMap.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-grafana-datasource + namespace: bassa-monitoring + labels: + grafana_datasource: '1' +data: + datasource.yaml: |- + apiVersion: 1 + datasources: + - name: Prometheus + type: prometheus + access: proxy + orgId: 1 + url: http://prometheus.bassa-monitoring.svc.cluster.local:8080 \ No newline at end of file diff --git a/scripts/kubernetes/manifests/monitoring/grafana-visualizer/getDataSources.yaml b/scripts/kubernetes/manifests/monitoring/grafana-visualizer/getDataSources.yaml new file mode 100644 index 00000000..1f66f2ef --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/grafana-visualizer/getDataSources.yaml @@ -0,0 +1,6 @@ +sidecar: + image: xuxinkun/k8s-sidecar:0.0.7 + imagePullPolicy: IfNotPresent + datasources: + enabled: true + label: grafana_datasource \ No newline at end of file diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/cluster-role-binding.yaml b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/cluster-role-binding.yaml new file mode 100644 index 00000000..c388b802 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/cluster-role-binding.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.7 + name: kube-state-metrics +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kube-state-metrics +subjects: + - kind: ServiceAccount + name: kube-state-metrics + namespace: kube-system diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/cluster-role.yaml b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/cluster-role.yaml new file mode 100644 index 00000000..9ca6ced4 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/cluster-role.yaml @@ -0,0 +1,117 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.7 + name: kube-state-metrics +rules: + - apiGroups: + - "" + resources: + - configmaps + - secrets + - nodes + - pods + - services + - resourcequotas + - replicationcontrollers + - limitranges + - persistentvolumeclaims + - persistentvolumes + - namespaces + - endpoints + verbs: + - list + - watch + - apiGroups: + - extensions + resources: + - daemonsets + - deployments + - replicasets + - ingresses + verbs: + - list + - watch + - apiGroups: + - apps + resources: + - statefulsets + - daemonsets + - deployments + - replicasets + verbs: + - list + - watch + - apiGroups: + - batch + resources: + - cronjobs + - jobs + verbs: + - list + - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - list + - watch + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - list + - watch + - apiGroups: + - certificates.k8s.io + resources: + - certificatesigningrequests + verbs: + - list + - watch + - apiGroups: + - storage.k8s.io + resources: + - storageclasses + - volumeattachments + verbs: + - list + - watch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - list + - watch + - apiGroups: + - networking.k8s.io + resources: + - networkpolicies + verbs: + - list + - watch + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - list + - watch diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/deployment.yaml b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/deployment.yaml new file mode 100644 index 00000000..5e67741f --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.7 + name: kube-state-metrics + namespace: kube-system +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kube-state-metrics + template: + metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.7 + spec: + containers: + - image: quay.io/coreos/kube-state-metrics:v1.9.7 + livenessProbe: + httpGet: + path: /healthz + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 + name: kube-state-metrics + ports: + - containerPort: 8080 + name: http-metrics + - containerPort: 8081 + name: telemetry + readinessProbe: + httpGet: + path: / + port: 8081 + initialDelaySeconds: 5 + timeoutSeconds: 5 + securityContext: + runAsUser: 65534 + nodeSelector: + kubernetes.io/os: linux + serviceAccountName: kube-state-metrics diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/service-account.yaml b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/service-account.yaml new file mode 100644 index 00000000..12e7ee11 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/service-account.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.7 + name: kube-state-metrics + namespace: kube-system diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/service.yaml b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/service.yaml new file mode 100644 index 00000000..c8c8c060 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/metric-exporters/kube-state-metrics/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.7 + name: kube-state-metrics + namespace: kube-system +spec: + clusterIP: None + ports: + - name: http-metrics + port: 8080 + targetPort: http-metrics + - name: telemetry + port: 8081 + targetPort: telemetry + selector: + app.kubernetes.io/name: kube-state-metrics diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/.gitkeep b/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/config.yaml b/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/config.yaml new file mode 100644 index 00000000..3928f4d0 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/config.yaml @@ -0,0 +1,61 @@ +--- +apiVersion: extensions/v1beta1 +kind: DaemonSet +metadata: + name: node-exporter + labels: + name: node-exporter + namespace: bassa-monitoring +spec: + template: + metadata: + labels: + name: node-exporter + app: node-exporter + annotations: + prometheus.io/scrape: "true" + spec: + hostPID: true + hostIPC: true + hostNetwork: true + containers: + - ports: + - containerPort: 9100 + protocol: TCP + resources: + requests: + cpu: 0.15 + securityContext: + privileged: true + image: prom/node-exporter + args: + - --path.procfs + - /host/proc + - --path.sysfs + - /host/sys + - --collector.filesystem.ignored-mount-points + - '"^/(sys|proc|dev|host|etc)($|/)"' + name: node-exporter + volumeMounts: + - name: dev + mountPath: /host/dev + - name: proc + mountPath: /host/proc + - name: sys + mountPath: /host/sys + - name: rootfs + mountPath: /rootfs + volumes: + - name: proc + hostPath: + path: /proc + - name: dev + hostPath: + path: /dev + - name: sys + hostPath: + path: /sys + - name: rootfs + hostPath: + path: / +--- diff --git a/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/service.yaml b/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/service.yaml new file mode 100644 index 00000000..bfa243b1 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/metric-exporters/node-exporter/service.yaml @@ -0,0 +1,13 @@ +kind: Service +apiVersion: v1 +metadata: + name: node-exporter + namespace: bassa-monitoring +spec: + selector: + app: node-exporter + ports: + - name: node-exporter + protocol: TCP + port: 9100 + targetPort: 9100 diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/configMap.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/configMap.yaml new file mode 100644 index 00000000..8ab9c151 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/configMap.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: bassa-monitoring +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: alertmanager + namespace: bassa-monitoring +data: + config.yml: |- + global: + resolve_timeout: 1m + templates: + - '/etc/alertmanager-templates/*.tmpl' + route: + receiver: 'bassa-mail-notifications' + + receivers: + - name: 'bassa-mail-notifications' + email_configs: + - to: bassa-monitoring-group@gmail.com + from: monitoring-alert-bot@gmail.com + smarthost: smtp.gmail.com:587 + auth_username: monitoring-alert-bot + auth_identity: monitoring-alert-bot + auth_password: password + send_resolved: true diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/deployment.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/deployment.yaml new file mode 100644 index 00000000..ca1654a1 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: alertmanager + namespace: bassa-monitoring +spec: + replicas: 1 + selector: + matchLabels: + app: alertmanager + template: + metadata: + name: alertmanager + labels: + app: alertmanager + spec: + containers: + - name: alertmanager + image: prom/alertmanager:v0.15.3 + args: + - "--config.file=/etc/alertmanager/config.yml" + - "--storage.path=/alertmanager" + ports: + - name: alertmanager + containerPort: 9093 + volumeMounts: + - name: config-volume + mountPath: /etc/alertmanager + - name: alertmanager + mountPath: /alertmanager + volumes: + - name: config-volume + configMap: + name: alertmanager + - name: alertmanager + emptyDir: {} diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/service.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/service.yaml new file mode 100644 index 00000000..2e78ed7f --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-alert-manager/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: "/metrics" + labels: + name: alertmanager + name: alertmanager + namespace: bassa-monitoring +spec: + selector: + app: alertmanager + type: LoadBalancer + ports: + - name: alertmanager + protocol: TCP + port: 9093 + targetPort: 9093 diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-monitor/configMap.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/configMap.yaml new file mode 100644 index 00000000..22568678 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/configMap.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: bassa-monitoring +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-server-conf + labels: + name: prometheus-server-conf + namespace: bassa-monitoring +data: + prometheus.yml: |- + global: + scrape_interval: 5s + evaluation_interval: 5s + rule_files: + - "/etc/prometheus-rules/*.rules" + alerting: + alertmanagers: + - scheme: http + path_prefix: / + static_configs: + - targets: ['alertmanager:9093'] + scrape_configs: + - job_name: 'kube-state-metrics' + static_configs: + - targets: ['kube-state-metrics.kube-system.svc.cluster.local:8080'] + - job_name: 'node-exporter' + static_configs: + - targets: ['node-exporter.kube-system.svc.cluster.local:9100'] diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-monitor/deployment.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/deployment.yaml new file mode 100644 index 00000000..7266c14d --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: prometheus + namespace: bassa-monitoring +spec: + replicas: 1 + template: + metadata: + labels: + app: prometheus + spec: + serviceAccountName: monitoring + containers: + - name: prometheus + image: prom/prometheus:v2.4.3 + args: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus/" + - "--web.enable-lifecycle" + - "--storage.tsdb.no-lockfile" + ports: + - name: prometheus + containerPort: 9090 + volumeMounts: + - name: prometheus-config-volume + mountPath: /etc/prometheus/ + - name: prometheus-storage-volume + mountPath: /prometheus/ + - name: rules-volume + mountPath: /etc/prometheus-rules + securityContext: + fsGroup: 2000 + runAsNonRoot: true + runAsUser: 1000 + volumes: + - name: prometheus-config-volume + configMap: + defaultMode: 420 + name: prometheus-server-conf + - name: prometheus-storage-volume + persistentVolumeClaim: + claimName: prometheus-claim + - name: rules-volume + configMap: + name: prometheus-rules diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-monitor/rules.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/rules.yaml new file mode 100644 index 00000000..ee31636c --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/rules.yaml @@ -0,0 +1,73 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-rules + labels: + name: prometheus-rules + namespace: bassa-monitoring +data: +# you can modify alert rules as you wish, useful explanation is added here https://github.com/scorelab/Bassa/wiki/Prometheus-for-monitoring-and-alerting-K8s-cluster + alert.rules: |- + groups: + - name: Deployment + rules: + - alert: Deployment at 0 Replicas + annotations: + summary: Deployment {{$labels.deployment}} in {{$labels.namespace}} is currently having no pods running + expr: | + sum(kube_deployment_status_replicas{pod_template_hash=""}) by (deployment,namespace) < 1 + for: 1m + labels: + name: 'bassa-mail-notifications' + - name: Pods + rules: + - alert: Container restarted + annotations: + summary: Container named {{$labels.container}} in {{$labels.pod}} in {{$labels.namespace}} was restarted + expr: | + sum(increase(kube_pod_container_status_restarts_total{namespace!="kube-system",pod_template_hash=""}[1m])) by (pod,namespace,container) > 0 + for: 0m + labels: + name: 'bassa-mail-notifications' + - alert: High Memory Usage of Container + annotations: + summary: Container named {{$labels.container}} in {{$labels.pod}} in {{$labels.namespace}} is using more than 75% of Memory Limit + expr: | + ((( sum(container_memory_usage_bytes{image!="",container_name!="POD", namespace!="kube-system"}) by (namespace,container_name,pod_name) / sum(container_spec_memory_limit_bytes{image!="",container_name!="POD",namespace!="kube-system"}) by (namespace,container_name,pod_name) ) * 100 ) < +Inf ) > 75 + for: 5m + labels: + name: 'bassa-mail-notifications' + - alert: High CPU Usage of Container + annotations: + summary: Container named {{$labels.container}} in {{$labels.pod}} in {{$labels.namespace}} is using more than 75% of CPU Limit + expr: | + ((sum(irate(container_cpu_usage_seconds_total{image!="",container_name!="POD", namespace!="kube-system"}[30s])) by (namespace,container_name,pod_name) / sum(container_spec_cpu_quota{image!="",container_name!="POD", namespace!="kube-system"} / container_spec_cpu_period{image!="",container_name!="POD", namespace!="kube-system"}) by (namespace,container_name,pod_name) ) * 100) > 75 + for: 5m + labels: + name: 'bassa-mail-notifications' + - name: Nodes + rules: + - alert: High Node Memory Usage + annotations: + summary: Node {{$labels.kubernetes_io_hostname}} has more than 80% memory used. Plan Capcity + expr: | + (sum (container_memory_working_set_bytes{id="/",container_name!="POD"}) by (kubernetes_io_hostname) / sum (machine_memory_bytes{}) by (kubernetes_io_hostname) * 100) > 80 + for: 5m + labels: + name: 'bassa-mail-notifications' + - alert: High Node CPU Usage + annotations: + summary: Node {{$labels.kubernetes_io_hostname}} has more than 80% allocatable cpu used. Plan Capacity. + expr: | + (sum(rate(container_cpu_usage_seconds_total{id="/", container_name!="POD"}[1m])) by (kubernetes_io_hostname) / sum(machine_cpu_cores) by (kubernetes_io_hostname) * 100) > 80 + for: 5m + labels: + name: 'bassa-mail-notifications' + - alert: High Node Disk Usage + annotations: + summary: Node {{$labels.kubernetes_io_hostname}} has more than 85% disk used. Plan Capacity. + expr: | + (sum(container_fs_usage_bytes{device=~"^/dev/[sv]d[a-z][1-9]$",id="/",container_name!="POD"}) by (kubernetes_io_hostname) / sum(container_fs_limit_bytes{container_name!="POD",device=~"^/dev/[sv]d[a-z][1-9]$",id="/"}) by (kubernetes_io_hostname)) * 100 > 85 + for: 5m + labels: + name: 'bassa-mail-notifications' \ No newline at end of file diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-monitor/service.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/service.yaml new file mode 100644 index 00000000..d3f4d296 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + name: prometheus + namespace: bassa-monitoring + labels: + name: prometheus +spec: + selector: + app: prometheus + ports: + - name: prometheus + port: 8080 + targetPort: prometheus + type: LoadBalancer diff --git a/scripts/kubernetes/manifests/monitoring/prometheus-monitor/storage.yaml b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/storage.yaml new file mode 100644 index 00000000..625aaf76 --- /dev/null +++ b/scripts/kubernetes/manifests/monitoring/prometheus-monitor/storage.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: prometheus-claim + namespace: bassa-monitoring +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 250Mi