作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
您好,提前谢谢您!
我有以下问题:
我正在尝试使用 Helm 在 AWS EKS 上安装 prometheus,但希望有机会将 AWS ELB 配置为私有(private)且可从我的 VPC 内部使用(默认情况下,它被创建为具有 FQDN 的公共(public) LoadBalancer)。
当我执行以下操作时:
helm install stable/prometheus --name prometheus \
--namespace prometheus \
--set alertmanager.persistentVolume.storageClass="gp2" \
--set server.persistentVolume.storageClass="gp2" \
--set server.service.type=LoadBalancer \
--set server.service.annotations{0}="service.beta.kubernetes.io/aws-load-balancer-internal":"0.0.0.0/0"
它创建了一个不包含任何注释的标准 LoadBalancer 服务:
$ kubectl describe service/prometheus-server -n=prometheus
Name: prometheus-server
Namespace: prometheus
Labels: app=prometheus
chart=prometheus-11.7.0
component=server
heritage=Tiller
release=prometheus
Annotations: <none>
Selector: app=prometheus,component=server,release=prometheus
Type: LoadBalancer
IP: 10.100.255.81
我在玩引号和其他可能的语法变化,但没有运气。请就正确的注释用法提出建议。
最佳答案
这有点棘手,但你可以这样做:
helm install stable/prometheus --name prometheus \
--namespace prometheus \
--set alertmanager.persistentVolume.storageClass="gp2" \
--set server.persistentVolume.storageClass="gp2" \
--set server.service.type=LoadBalancer \
--set server.service.annotations."service\.beta\.kubernetes\.io/aws-load-balancer-internal"="0.0.0.0/0"
可以在这里查看set的格式和限制
in the Helm docs .例如,
--set nodeSelector."kubernetes\.io/role"=master
变成:
nodeSelector:
kubernetes.io/role: master
✌️
关于amazon-web-services - AWS 上的 Helm prometheus 自定义负载均衡器配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62999136/
我是一名优秀的程序员,十分优秀!