Azure Kubernetes Service (AKS) with Prometheus and Grafana

Prometheus and Grafana Installation

# add Prometheus-community as the local repository list
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
# update local repositories
helm repo update
# search for the local repositories
helm repo list
# search for the target chart within local repositories
helm search repo prometheus-community
# create a namespace to save all Prometheus-related resources
kubectl create ns prometheus
# install Prometheus through HELM
helm install prometheus prometheus-community/kube-prometheus-stack -n prometheus
# check all resources related with Prometheus
kubectl get all -n prometheus

Prometheus and Grafana Test

# get the pod hosting Prometheus service
kubectl get all -n prometheus | grep operator
# port forward the Prometheus service to localhost:port
kubectl port-forward -n prometheus prometheus-prometheus-kube-prometheus-prometheus-0 9090
# get Grafana's user credentials
kubectl get secrets prometheus-grafana -n prometheus -o yaml
# search for admin-user and admin-password
# convert admin-user and admin-password from base64 encoding
echo "YWRtaW4=" | base64 -d
echo "cHJvbS1vcGVyYXRvcg==" | base64 -d
# get the pod hosting Grafana service
kubectl get all -n prometheus | grep grafana
# port forward the Grafana service to localhost:port
kubectl port-forward -n prometheus prometheus-grafana-7b6d665f8f-z8xqm 3000

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store