gpt4 book ai didi

amazon-web-services - AWS 上的 Helm prometheus 自定义负载均衡器配置

转载 作者:行者123 更新时间:2023-12-02 12:00:35 24 4
gpt4 key购买 nike

您好,提前谢谢您!
我有以下问题:
我正在尝试使用 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com