Search code examples
kuberneteskubernetes-helmamazon-eks

how to define StackGres helm chart "restapi" values to use internal LoadBalancer - AWS EKS


I am trying to install the "StackGres" using helm chart defined on their website (https://stackgres.io/install/) I have pulled the chart in my local and trying to modify the Service type to "LoadBalancer" and adding "annotations" to enable the internal LoadBalancer.

I have tried to supply the below file content using helm upgrade command, but this is not creating the Internal LoadBalancer(in my private subnet)

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

Solution

  • I have seen this issue earlier in my test POC as well, you can change the new-val.yaml file as below and try to re-deploy.

    restapi:
      service:
        annotations:
            service.beta.kubernetes.io/aws-load-balancer-internal: true
    
    adminui:
      service:
        type: LoadBalancer
    
    

    Also one more suggestion, if you want to change the current running SGCluster's network type from public to Internal LoadBalancer then as of now directly this will not work, as this will fail into AWS Error. you can try to first put your current StackGres cluster's NodeType to NodePort and then deploy, once deployment is done, deploy again with LoadBalancer with the right annotations. This will re-create the Internal LoadBalancer for your existing SGCluster.