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

--

--

--

Learning new things about Kubernetes every day. Hopefully, the learning notes could help people on the same journey!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Ceph Nano — S3

Fixing DNS Issues in Ubuntu 18.04 LTS

Network namespace in own container

Building Hibug #3. Going in circles

WANT TO WIN $10,000? Join our competition.

How to install Oracle 12C in a Linux environment

C# tutorial — Basic Rock, Paper, Scissors game

More OO Design: Open/Closed Principle

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
Jonathan

Jonathan

Learning new things about Kubernetes every day. Hopefully, the learning notes could help people on the same journey!

More from Medium

Building up a hardened production-ready AKS cluster: 01 — Identities

Deploying your app using Shipa and Azure Pipelines

Azure Kubernetes Service (AKS) with Kubernetes Event-Driven Autoscaling (KEDA)

Best Practices for AKS cluster security and upgrades