From 3ea6b730c8ec51b4167fe1052bf7d440104f588c Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Fri, 17 Jan 2020 11:46:58 -0600 Subject: [PATCH] Update the Prometheus install instructions --- slides/k8s/prometheus.md | 42 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/slides/k8s/prometheus.md b/slides/k8s/prometheus.md index 049bea18..3052c61e 100644 --- a/slides/k8s/prometheus.md +++ b/slides/k8s/prometheus.md @@ -204,32 +204,46 @@ We need to: ## Step 1: install Helm -- If we already installed Helm earlier, these commands won't break anything +- If we already installed Helm earlier, this command won't break anything -.exercice[ +.exercise[ -- Install Tiller (Helm's server-side component) on our cluster: +- Install the Helm CLI: ```bash - helm init - ``` - -- Give Tiller permission to deploy things on our cluster: - ```bash - kubectl create clusterrolebinding add-on-cluster-admin \ - --clusterrole=cluster-admin --serviceaccount=kube-system:default + curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get-helm-3 \ + | bash ``` ] --- -## Step 2: install Prometheus +## Step 2: add the `stable` repo -- Skip this if we already installed Prometheus earlier +- This will add the repository containing the chart for Prometheus - (in doubt, check with `helm list`) +- This command is idempotent -.exercice[ + (it won't break anything if the repository was already added) + +.exercise[ + +- Add the repository: + ```bash + helm repo add stable https://kubernetes-charts.storage.googleapis.com/ + ``` + +] + +--- + +## Step 3: install Prometheus + +- The following command, just like the previous ones, is idempotent + + (it won't error out if Prometheus is already installed) + +.exercise[ - Install Prometheus on our cluster: ```bash