パッケージダウンロード
git clone git@github.com:prometheus-community/helm-charts.git
リポジトリ登録
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
リポジトリ登録確認
helm repo list
出力
prometheus-community https://prometheus-community.github.io/helm-charts
ディレクトリ移動
cd helm-charts/charts/prometheus
デプロイ
- value.yamlでNodeExportの設定が
true
になっているので、デフォルトでNodeExporterも構成される
helm install prometheus prometheus-community/prometheus
接続
export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace default port-forward $POD_NAME 9090