Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsupported IPv6 configuration, lb not dual-stack with target-type: ip and aws-load-balancer-ip-address-type: dualstack #3572

Closed
MarcusDunn opened this issue Feb 12, 2024 · 2 comments

Comments

@MarcusDunn
Copy link

MarcusDunn commented Feb 12, 2024

I'm on EKS (version "1.29" with an ip family set to ipv6), everything is running smoothly with the exception of ingress.

I have the following service + Ingress

apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend-deployment
  namespace: default
  labels:
    app: frontend
spec:
  replicas: 2
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
        - name: frontend
          image: 686251448790.dkr.ecr.us-west-2.amazonaws.com/frontend:0.0.77
          imagePullPolicy: Always
          env:
            - name: BACKEND_URL
              value: http://backend-service:8080
            - name: PORT
              value: "80"
            - name: CLIENT_MAX_BODY_SIZE
              value: "100M"
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
              ephemeral-storage: 100Mi
---
apiVersion: v1
kind: Service
metadata:
  name: frontend
spec:
  selector:
    app: frontend
  ports:
    - protocol: TCP
      port: 80
  type: NodePort
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: frontend-ingress
  namespace: default
  annotations:
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/load-balancer-name: frontend
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
    alb.ingress.kubernetes.io/ssl-redirect: '443'
    alb.ingress.kubernetes.io/aws-load-balancer-ip-address-type: dualstack
    alb.ingress.kubernetes.io/target-type: 'ip'
spec:
  ingressClassName: alb
  rules:
    - host: *********
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: frontend
                port:
                  number: 80
Full
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    alb.ingress.kubernetes.io/aws-load-balancer-ip-address-type: dualstack
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
    alb.ingress.kubernetes.io/load-balancer-name: frontend
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/ssl-redirect: '443'
    alb.ingress.kubernetes.io/target-type: ip
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"alb.ingress.kubernetes.io/aws-load-balancer-ip-address-type":"dualstack","alb.ingress.kubernetes.io/listen-ports":"[{\"HTTP\":
      80},
      {\"HTTPS\":443}]","alb.ingress.kubernetes.io/load-balancer-name":"frontend","alb.ingress.kubernetes.io/scheme":"internet-facing","alb.ingress.kubernetes.io/ssl-redirect":"443","alb.ingress.kubernetes.io/target-type":"ip"},"labels":{"app.kubernetes.io/instance":"utilityai"},"name":"frontend-ingress","namespace":"default"},"spec":{"ingressClassName":"alb","rules":[{"host":"*******","http":{"paths":[{"backend":{"service":{"name":"frontend","port":{"number":80}}},"path":"/","pathType":"Prefix"}]}}]}}
  creationTimestamp: '2024-02-12T18:54:40Z'
  finalizers:
    - ingress.k8s.aws/resources
  generation: 1
  labels:
    app.kubernetes.io/instance: utilityai
  managedFields:
    - apiVersion: networking.k8s.io/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:finalizers':
            .: {}
            'v:"ingress.k8s.aws/resources"': {}
      manager: controller
      operation: Update
      time: '2024-02-12T18:54:40Z'
    - apiVersion: networking.k8s.io/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:alb.ingress.kubernetes.io/aws-load-balancer-ip-address-type': {}
            'f:alb.ingress.kubernetes.io/listen-ports': {}
            'f:alb.ingress.kubernetes.io/load-balancer-name': {}
            'f:alb.ingress.kubernetes.io/scheme': {}
            'f:alb.ingress.kubernetes.io/ssl-redirect': {}
            'f:alb.ingress.kubernetes.io/target-type': {}
            'f:kubectl.kubernetes.io/last-applied-configuration': {}
          'f:labels':
            .: {}
            'f:app.kubernetes.io/instance': {}
        'f:spec':
          'f:ingressClassName': {}
          'f:rules': {}
      manager: argocd-controller
      operation: Update
      time: '2024-02-12T19:01:31Z'
  name: frontend-ingress
  namespace: default
  resourceVersion: '22484'
  uid: dba3133d-5ca9-420c-ba6b-1ba5d551041c
spec:
  ingressClassName: alb
  rules:
    - host: ********
      http:
        paths:
          - backend:
              service:
                name: frontend
                port:
                  number: 80
            path: /
            pathType: Prefix
status:
  loadBalancer: {}

With the controller deployed (helm chart version 2.7.1) via ArgoCD

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: aws-gateway-controller-chart
  namespace: argocd
spec:
  project: default
  source:
    chart: aws-load-balancer-controller
    repoURL: https://aws.github.io/eks-charts
    targetRevision: 1.7.1
    helm:
      valuesObject:
        clusterName: example
        serviceAccount:
          create: false
          name: aws-load-balancer-controller
  syncPolicy:
    automated:
      prune: true
  destination:
    server: "https://kubernetes.default.svc"
    namespace: kube-system

But it fails to provision an ALB with the following error:

{
  "level": "error",
  "ts": "2024-02-12T19:28:43Z",
  "msg": "Reconciler error",
  "controller": "ingress",
  "object": {
    "name": "frontend-ingress",
    "namespace": "default"
  },
  "namespace": "default",
  "name": "frontend-ingress",
  "reconcileID": "9a76bd04-77de-4cbe-8a66-f78253f312e8",
  "error": "ingress: default/frontend-ingress: unsupported IPv6 configuration, lb not dual-stack"
}

There's a similar issues that I've found that do not seem to fix it:

@MarcusDunn
Copy link
Author

MarcusDunn commented Feb 12, 2024

issue was that the name changed from beta to now

alb.ingress.kubernetes.io/ip-address-type instead of alb.ingress.kubernetes.io/aws-load-balancer-ip-address-type works

@kaykhan
Copy link

kaykhan commented May 14, 2024

@MarcusDunn Do you use terraform aws eks module? I am curious if you ran into the issue The following targets cannot be used with this IPv6 target group because of missing primary IPv6 addresses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants