Scroll to top
© 2018 All Rights Reserved.
Share

How to Setup Prometheus Operator and kube-prometheus on Kubernetes Cluster


Dominik Sachsenhofer - 29. May 2018 - 0 comments

How to Setup Prometheus Operator and kube-prometheus on Kubernetes Cluster

1. Install Helm

Download and install Helm:

https://github.com/kubernetes/helm

2. Set up a ClusterRoleBinding for Helm

cat <<EOF | kubectl create -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tiller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
EOF

3. Initialize Helm

helm init --service-account tiller

4. Install Prometheus

helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
helm install coreos/prometheus-operator --name prometheus-operator --namespace monitoring
helm install coreos/kube-prometheus --name kube-prometheus --set global.rbacEnable=true --namespace monitoring

Post a Comment

Your email address will not be published. Required fields are marked *