我正在尝试使用其网站上定义的 Helm Chart 安装“StackGres”(https://stackgres.io/install/) 我已将图表拉到本地,并尝试将服务类型修改为“LoadBalancer”并添加“注释”以启用内部 LoadBalancer。
我尝试使用 helm update 命令提供以下文件内容,但这并没有创建内部 LoadBalancer(在我的私有子网中)
helm upgrade --install stackgres-operator stackgres-charts/stackgres-operator \ --namespace stackgres \ --values new-val.yaml
restapi:
serviceAccount:
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: true
service:
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: true
adminui:
service:
type: LoadBalancer
我之前在测试 POC 中也看到过这个问题,您可以按如下方式更改
new-val.yaml
文件并尝试重新部署。
restapi:
service:
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: true
adminui:
service:
type: LoadBalancer
还有一个建议,如果您想将当前运行的 SGCluster 的网络类型从公共更改为内部 LoadBalancer,那么到目前为止,直接这样做是行不通的,因为这将导致 AWS 错误。您可以尝试先将当前 StackGres 集群的 NodeType 设置为
NodePort
,然后部署,部署完成后,使用 LoadBalancer
并使用正确的注释再次部署。这将为您现有的 SGCluster 重新创建内部负载均衡器。