11.3 Prometheusオペレータのインストール
helmコマンドを使用して、Prometheusオペレータをインストールします:
helm install <release_name> prometheus/kube-prometheus-stack -n <namespace>
例:helm install monitoring prometheus/kube-prometheus-stack -n monitoring
出力は次のようになります。NAME: monitoring
LAST DEPLOYED: <DATE>
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
NOTES:
kube-prometheus-stack has been installed. Check its status by running:
kubectl --namespace monitoring get pods -l "release=monitoring"
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
ノート:
PrometheusやGrafanaなどの外部イメージをプルするためのインターネットへのアクセス権がクラスタにない場合は、ローカル・コンテナ・レジストリにイメージをロードする必要があります。その後、次のようにインストールする必要があります:helm install \
--set grafana.image.registry="container-registry.example.com" \
--set grafana.image.repository="grafana/grafana" \
--set grafana.image.tag=8.4.2 \
monitoring prometheus/kube-prometheus-stack \
-n monitoring