gruntwork-io / kubergrunt

Kubergrunt is a standalone go binary with a collection of commands to fill in the gaps between Terraform, Helm, and Kubectl. https://www.gruntwork.io
Apache License 2.0
518 stars 88 forks source link

kubergrunt eks deploy - unrecognized loadbalancer annotation #210

Open joncolby opened 1 year ago

joncolby commented 1 year ago

description:

when running kubergrunt eks deploy , the new nodes are successfully added, but kubergrunt throws an error in the LB discovery phase:

[] INFO[2023-09-04T13:27:47+02:00] Found 14 LoadBalancer services of 393 services in kubernetes.  name=kubergrunt
[] ERRO[2023-09-04T13:27:47+02:00] Error retrieving associated ELB names of the Kubernetes services.  name=kubergrunt
[] ERRO[2023-09-04T13:27:47+02:00] Undo by terminating all the new instances and trying again  name=kubergrunt
[] ERRO[2023-09-04T13:27:47+02:00] Error while waiting for new nodes to be ready.  name=kubergrunt
[] ERRO[2023-09-04T13:27:47+02:00] Either resume with the recovery file or terminate the new instances.  name=kubergrunt
ERROR: Unknown value for annotation service.beta.kubernetes.io/aws-load-balancer-type (value: nlb-ip)

what i cannot understand, is that "nlb-ip" is a valid value, and I see this in the load-balancer lookup code: https://github.com/gruntwork-io/kubergrunt/blob/32b0d81ec953428cac91dfb209f8bc88a933e71f/kubectl/service.go#L22

here is an example service annotation, with sensitive values removed:

kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
    service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout: "10"
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
    service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "false"
    service.beta.kubernetes.io/aws-load-balancer-ip-address-type: ipv4
    service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
    service.beta.kubernetes.io/aws-load-balancer-scheme: internal
    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ""
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: ""
    service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip

versions:

❯ kubergrunt --version
kubergrunt version v0.12.1

eks cluster version 1.24