<iframe width="560" height="315" src="https://www.youtube.com/embed/GL2v81xYuAQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> There are several ways to set up [[Prometheus]] in [[Kubernetes]]: [^setup] 1. Create all configuration YAML files manually. 2. Use a [[Kubernetes Operator]]. 3. Use [[Helm (god)]] chart to deploy the published Prometheus operator. Of these options, the third is the easiest. ## Installing via Helm ### Add the official Prometheus Helm Chart repo `helm repo add prometheus-community https://prometheus-community.github.io/helm-charts` ### Install Prometheus from the Helm Chart `helm install prometheus prometheus-community/prometheus` This command will install Prometheus and also automatically fetch metrics from Kubernetes pods. ### Get access to the Prometheus UI You'll need to forward the port that Prometheus is running on so that you can access the UI that it comes with. By default, Prometheus runs on port `9090`, but you can check the service logs to verify that. `kubectl port-forward prometheus-server-85b85779d8-w2pz2 9090` will make the Prometheus UI available on `localhost:9090`. (where `prometheus-server...` is the name of the pod) ## References [^setup]: Tech World with Nana. (2020). [[Setup Prometheus Monitoring on Kubernetes using Helm and Prometheus Operator - Part 1]]. Retrieved from https://www.youtube.com/watch?v=QoDqxm7ybLc