在Amazon EKS上使用Prometheus
首先
我将整理如何在 Amazon EKS 上使用 Prometheus 的方法。
这里假设使用的是 Mac 环境。
准备执行环境
-
- 请参考以下内容来设置AWS CLI,以便运行AWS CloudFormation。
请参考使用eksctl在Mac上构建Amazon EKS集群的方法。
请参考在Mac上配置Amazon EKS来设置EKS的上下文。
请参考在Amazon EKS上使用Helm的方法。
环境配置
-
- 使用Helm在Kubernetes集群上安装Prometheus的图表
-
- ※先设置Kubernetes集群的上下文设置。
-
- # 添加Prometheus图表存储库
-
- helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
# 安装Prometheus图表
helm upgrade -i prometheus prometheus-community/prometheus \
–namespace prometheus \
–set alertmanager.persistentVolume.storageClass=”gp2″,server.persistentVolume.storageClass=”gp2″ \
–create-namespace
# 确认已安装Prometheus
helm list -n prometheus
启动Prometheus
kubectl –namespace=prometheus port-forward deploy/prometheus-server 9090
访问Prometheus
打开”http://localhost:9090″
清洁
-
- 使用Helm删除Prometheus
-
- helm 删除 prometheus -n prometheus
删除命名空间
kubectl 删除 ns prometheus
请提供更多上下文来使我能够帮助您将该句子翻译成中文。
使用Prometheus控制普通指标平台。