
當容器叢集環境建設好之後,想知道容器叢集用了多少運算資源,這時候就不得不提到Prometheus(普羅米修斯),本文快速記錄一下在Azure AKS架設好Cluster後,step by step 啟用 Prometheus。
- 首先在本機使用 windows terminal登入azure (個人工作機為windows os)
az login
- 安裝 kubectl
az aks install-cli
- 取得管理Cluster憑證
az aks get-credentials --resource-group <aks rs groupd> --name <aks service name>
- 由於我們會使用 helm 安裝 Prometheus,所以請至 github - helm 下載 windows版本 helm
- 加入 helm Repository 並更新
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
- 建立專用namespace (看規劃,個人習慣性獨立namespace)
kubectl create ns prometheus
- 使用helm安裝Prometheus
helm install prometheus prometheus-community/kube-prometheus-stack -n prometheus
- 查看所有 prometheus 建置資源,確認所有資源都正常運行
kubectl get all -n prometheus
- 使用 Len 也可以順利取得資訊


參考資源:
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack
https://github.com/helm/helm/releases
若本文對您有所幫助,歡迎轉貼,但請在加註【轉貼】及來源出處,並在附上本篇的超連結,感恩您的配合囉。
By No.18