Helm chart to monitor a kubernetes cluster created using Rancher
This is basically a fork of the CoreOS team's kube-prometheus
chart. See https://github.com/coreos/prometheus-operator/tree/master/helm/kube-prometheus.
We are using Helm along with Quay.io to host our Helm charts. See https://github.com/app-registry/appr-helm-plugin and https://coreos.com/blog/quay-application-registry-for-kubernetes.html.
See https://docs.helm.sh for more about Helm.
- Helm 2.5.1
- Run
helm init
prior to any other commands
- Run
- Kubernetes 1.4+ with Beta APIs enabled
- Prometheus Operator 0.0.6 If you haven't installed previously, run:
helm repo add opsgoodness http://charts.opsgoodness.com
helm install opsgoodness/prometheus-operator --version 0.0.6 --name po
To install with release name my-release
run:
helm registry install quay.io/3dsim/kube-prometheus --name=my-release --set grafana.dataSourceURL=<url of prometheus> --set prometheus.externalUrl=<url of prometheus> --set prometheus.externalLabels.env=<env>
To uninstall/delete the my-release deployment:
helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
See values.yaml for configuration options.
Use --set
syntax to set a value:
helm registry install quay.io/3dsim/kube-prometheus --name=my-release --set resources.limits.cpu=300m
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
helm registry install quay.io/3dsim/kube-prometheus --name=my-release -f values.yaml
- Create the dashboard in Grafana UI.
- Export the dashboard as JSON.
- Insert exported JSON in the template below:
{
"dashboard": {
< Paste exported JSON here >
},
"inputs": [
{
"name": "DS_PROMETHEUS",
"pluginId": "prometheus",
"type": "datasource",
"value": "prometheus"
}
],
"overwrite": true
}
- Add to the
grafana.serverDashboardFiles
field invalues.yaml
If you make changes and want to push a new version to quay.io, do the following...
- Bump the version in Chart.yaml.
- If you modified the dependencies in
requirements.yaml
, run the following commands to update them. (Currently dependencies are pushed to quay.io repo, and checked into github.)
helm repo add opsgoodness http://charts.opsgoodness.com
helm repo add cloudposse https://charts.cloudposse.com/incubator
rm -rf charts/ appr_charts/
helm registry dep --overwrite
helm dep build
The above steps were taken from this github comment 3. Login to quay.io (if you haven't previously)
helm registry login -u <your username> quay.io
- Push new version
helm registry push --namespace 3dsim quay.io
See https://github.com/app-registry/appr-helm-plugin#create-and-push-your-own-chart for more info.
- Commit all outstanding changes to github