From d4c338c62cad7c08a0ef7fd8573162c623c962c2 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Wed, 7 Nov 2018 23:08:51 -0600 Subject: [PATCH] Update prom slides for QCON preload --- slides/k8s/prometheus.md | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/slides/k8s/prometheus.md b/slides/k8s/prometheus.md index bf3cc905..df1d7607 100644 --- a/slides/k8s/prometheus.md +++ b/slides/k8s/prometheus.md @@ -151,7 +151,7 @@ scrape_configs: ## Running Prometheus on our cluster -We need to: +We would need to: - Run the Prometheus server in a pod @@ -171,19 +171,21 @@ We need to: ## Helm Charts to the rescue -- To make our lives easier, we are going to use a Helm Chart +- To make our lives easier, we could use a Helm Chart -- The Helm Chart will take care of all the steps explained above +- The Helm Chart would take care of all the steps explained above (including some extra features that we don't need, but won't hurt) +- In fact, Prometheus has been pre-installed on our clusters with Helm + + (it was pre-installed so that it would be populated with metrics by now) + --- -## Step 1: install Helm +## Step 1: if we had to install Helm -- If we already installed Helm earlier, these commands won't break anything - -.exercice[ +- Note that if Helm is already installed, these commands won't break anything - Install Tiller (Helm's server-side component) on our cluster: ```bash @@ -196,27 +198,17 @@ We need to: --clusterrole=cluster-admin --serviceaccount=kube-system:default ``` -] - --- -## Step 2: install Prometheus +## Step 2: if we had to install Prometheus -- Skip this if we already installed Prometheus earlier - - (in doubt, check with `helm list`) - -.exercice[ - -- Install Prometheus on our cluster: +- This is how we would use Helm to deploy Prometheus on the cluster: ```bash helm install stable/prometheus \ --set server.service.type=NodePort \ --set server.persistentVolume.enabled=false ``` -] - The provided flags: - expose the server web UI (and API) on a NodePort @@ -235,11 +227,13 @@ The provided flags: - Figure out the NodePort that was allocated to the Prometheus server: ```bash - kubectl get svc | grep prometheus-server + kubectl get svc -n kube-system | grep prometheus-server ``` - With your browser, connect to that port + (spoiler alert: it should be 30090) + ] ---