Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, I am currently having one issue with this tutorial => helm chart for grafana’s part is not working:
If I go to a log, i can see following message:
a container name must be specified for pod prometheus-monitoring-grafana-b98876d79-8st5c, choose one of: [grafana-sc-dashboard grafana] or one of the init containers: [init-chown-data grafana-sc-datasources]
Deployment.yaml file generated by helm looks like this:
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: prometheus-monitoring-grafana
labels:
app: grafana
chart: grafana-2.0.2
release: prometheus-monitoring
heritage: Tiller
spec:
replicas: 1
selector:
matchLabels:
app: grafana
release: prometheus-monitoring
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: grafana
release: prometheus-monitoring
spec:
serviceAccountName: prometheus-monitoring-grafana
securityContext:
fsGroup: 472
runAsUser: 472
initContainers:
- name: init-chown-data
image: "busybox:1.30.0"
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
command: ["chown", "-R", "472:472", "/var/lib/grafana"]
volumeMounts:
- name: storage
mountPath: "/var/lib/grafana"
- name: grafana-sc-datasources
image: "kiwigrid/k8s-sidecar:0.0.10"
imagePullPolicy: IfNotPresent
env:
- name: METHOD
value: LIST
- name: LABEL
value: "grafana_datasource"
- name: FOLDER
value: "/etc/grafana/provisioning/datasources"
resources:
null
volumeMounts:
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
containers:
- name: grafana-sc-dashboard
image: "kiwigrid/k8s-sidecar:0.0.10"
imagePullPolicy: IfNotPresent
env:
- name: LABEL
value: "grafana_dashboard"
- name: FOLDER
value: "/tmp/dashboards"
resources:
null
volumeMounts:
- name: sc-dashboard-volume
mountPath: "/tmp/dashboards"
- name: grafana
image: "grafana/grafana:5.4.3"
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config
mountPath: "/etc/grafana/grafana.ini"
subPath: grafana.ini
- name: ldap
mountPath: "/etc/grafana/ldap.toml"
subPath: ldap.toml
- name: storage
mountPath: "/var/lib/grafana"
- name: sc-dashboard-volume
mountPath: "/tmp/dashboards"
- name: sc-dashboard-provider
mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml"
subPath: provider.yaml
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
ports:
- name: service
containerPort: 80
protocol: TCP
- name: grafana
containerPort: 3000
protocol: TCP
env:
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
name: prometheus-monitoring-grafana
key: admin-user
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: prometheus-monitoring-grafana
key: admin-password
livenessProbe:
failureThreshold: 10
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 60
timeoutSeconds: 30
readinessProbe:
httpGet:
path: /api/health
port: 3000
resources:
{}
volumes:
- name: config
configMap:
name: prometheus-monitoring-grafana
- name: ldap
secret:
secretName: prometheus-monitoring-grafana
items:
- key: ldap-toml
path: ldap.toml
- name: storage
persistentVolumeClaim:
claimName: prometheus-monitoring-grafana
- name: sc-dashboard-volume
emptyDir: {}
- name: sc-dashboard-provider
configMap:
name: prometheus-monitoring-grafana-config-dashboards
- name: sc-datasources-volume
emptyDir: {}
Thanks
This doesn’t seem to be functioning… I follow your steps and when trying to deploy I get:
E0606 16:12:58.981508 30683 portforward.go:233] lost connection to pod
Error: transport is closing
The only difference is that the cluster is in AWS.
I’ve also tried to deploy without the custom-values.yaml, and the error is:
Error: release doks-cluster-monitoring failed: Post https://XXX.XXX.XXX.XXX:443/apis/rbac.authorization.k8s.io/v1/clusterroles: http2: server sent GOAWAY and closed the connection; LastStreamID=283, ErrCode=NO_ERROR, debug=""
``
The dashboards are not loaded and when you log in to Grafana, there are not any preloaded dashboards.
This works for me with helm 3 and kube-prometheus-stack chart, the only problem I had is that I needed to set the permissions for the prometheus volume.
prometheus:
prometheusSpec:
securityContext:
runAsNonRoot: false
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: do-block-storage
resources:
requests:
storage: 3Gi
initContainers:
- name: set-data-dir-ownership
image: busybox:1.30
securityContext:
runAsUser: 0
command: ["/bin/sh", "-c"]
args:
- chown -R 1000:2000 /data;
volumeMounts:
- name: prometheus-kube-prometheus-stack-prometheus-db
mountPath: /data
subPath: prometheus-db
This tutorial is no longer up to date.
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Pod referencing DOBS volumes must be owned by StatefulSet
pod: prometheus-doks-cluster-monitoring-pr-prometheus-0
Avoid using hostpath for volume 'proc'.
pod: doks-cluster-monitoring-prometheus-node-exporter-2nlrp
Avoid using hostpath for volume 'sys'.
pod: doks-cluster-monitoring-prometheus-node-exporter-2nlrp
Avoid using hostpath for volume 'proc'.
pod: doks-cluster-monitoring-prometheus-node-exporter-r8j7f
Avoid using hostpath for volume 'sys'.
pod: doks-cluster-monitoring-prometheus-node-exporter-r8j7f
Avoid using hostpath for volume 'proc'.
pod: doks-cluster-monitoring-prometheus-node-exporter-vh2hh
Avoid using hostpath for volume 'sys'.
pod: doks-cluster-monitoring-prometheus-node-exporter-vh2hh
The syntax for helm is for helm 2, helm 3 is now standard.
The helm package reports itself as being deprecated.
timothy@yoga ~/p/a/k/helm-settings>
helm install doks-cluster-monitoring --namespace monitoring -f prometheus.yaml stable/prometheus-operator
WARNING: This chart is deprecated
W0714 17:48:05.410053 3065 warnings.go:70] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0714 17:48:05.695750 3065 warnings.go:70] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0714 17:48:06.240629 3065 warnings.go:70] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0714 17:48:06.428526 3065 warnings.go:70] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0714 17:48:06.666629 3065 warnings.go:70] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0714 17:48:07.431276 3065 warnings.go:70] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
Error: rendered manifests contain a resource that already exists. Unable to continue with install: PodSecurityPolicy "doks-cluster-monitoring-grafana" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "monitoring": current value is "default"
timothy@yoga ~/p/a/k/helm-settings>
Anyone know what the current correct way of doing this is?
I dont really understand why those tutorials always end up with running something on your local host. Would be great if at least try to use and online droplet or something.