ALB Ingress controller gotcha

If you're running a Kubernetes cluster on AWS (via EKS, kops, or otherwise), you're probably using the AWS ALB Ingress controller to create Application Load Balancers (ALBs) that map to Kubernetes Ingress resources.

If so, be aware of the following gotcha: When adding ALB-specific annotations on the Ingress config, be sure that all ostensibly numeric values are actually single- or double-quoted strings:

apiVersion: extensions/v1beta1
kind: Ingress
  name: users
  annotations: alb internet-facing ipv4 '[{"HTTP": 80}]' sg-XXXXXXXXXXXXXXX ip HTTP traffic-port /myhealthcheck
    # Note: these must be quoted strings, or the resource will be ignored by the ingress controller! "5" "1" "200" "3" "3"

Otherwise, for some reason, the ingress controller ignores the entire resource, and no ALB will be created. You will not even see any logs to this effect on the ingress controller!

Ironically, string values don't need quoting, thanks to YAML being so loose. But integers do, so that they're coerced to strings.

Show Comments