| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This sample installs Prometheus and Grafana for observability in your Kubernetes cluster. This folder contains a Helm chart that sets up these components with Traefik ingress and cert-manager as dependencies for ingress and TLS management.
NOTE: This installation of Prometheus has most of the kube-prometheus-stack chart components disabled. That is intentional to keep the setup simple and focused on basic observability needs. If you plan to make this your main observability stack, you should evaluate enabling more components by modifying the values.yaml or hack/values.yaml file as needed.
helm repo add coreweave https://charts.core-services.ingress.coreweave.com
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo updateYou need to install Traefik and cert-manager before installing this chart. If you haven't done so, follow the instructions in the CoreWeave documentation to install Traefik and cert-manager.
First install Traefik:
helm install traefik coreweave/traefik --namespace traefik --create-namespaceThen install cert-manager (this needs to happen in two steps):
helm install cert-manager coreweave/cert-manager --namespace cert-manager --create-namespace
helm upgrade cert-manager coreweave/cert-manager --namespace cert-manager --set cert-issuers.enabled=true If you haven't already, get the dependencies for this chart:
helm dependency buildThe default values won't work out of the box because you need to add CLUSTER_ORG and CLUSTER_NAME in your overrides. You can do this by replacing the placeholder values in hack/values.yaml file and using that file in the install command (as shown below in this guide), or overriding them with another file or command line arguments.
If you want to enable external access to query metrics from a source outside your cluster (i.e., not the cluster Grafana), you'll need to set the prometheus.externalAccess.enabled value to true and update the credentials (unless you want to keep the default ones). The default values are username admin and password cwadmin. You can set it in the values.yaml file under prometheus.externalAccess.credentials; however, it needs to be hashed. To hash one yourself, you can run the following command in any machine (you can install htpasswd by intalling the apache2-utils package on Debian/Ubuntu or httpd-tools on CentOS/RHEL):
USERNAME=admin
PASSWORD=cwadmin
htpasswd -nb $USERNAME $PASSWORDThis will output a hashed password that you can use in your values.yaml file.
Note that you don't need to set the prometheus.externalAccess.enabled value if you only want to see metrics in the Grafana instance we will deploy with this sample.
Once your values are set, you can install the chart with:
helm install observability ./ --namespace monitoring --create-namespace --values ./hack/values.yamlReplace ./ with the path to this chart if running from a different directory.
The chart creates an Ingress for Grafana using Traefik and TLS is managed by cert-manager.
To get the password for the admin user in Grafana, you must run the following command (this will get you the password):
kubectl get secret observability-grafana -n monitoring -o=jsonpath='{.data.admin-password}' | base64 --decode; echoYou need to go to the Grafana UI at the deployed endpoint and enter the username admin with the password returned by the command above.
To get the endpoint, run the following command:
kubectl get ingress observability-grafana -n monitoring -o=jsonpath='{.spec.rules[0].host}'; echoThen go to the endpoint in your browser and log in.
NOTE: This assumes you used the default namespace monitoring and default release name observability. If you used different values, update the commands.
You can customize values in values.yaml to suit your environment.
To remove the chart:
helm uninstall observability --namespace monitoringTo remove the monitoring namespace:
kubectl delete namespace monitoringTo remove Traefik and cert-manager, you can run:
helm uninstall traefik --namespace traefik
helm uninstall cert-manager --namespace cert-manager
kubectl delete namespace traefik
kubectl delete namespace cert-manager| Back | FazBrowse Home | New Git URL |