{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes-sigs/aws-alb-ingress-controller/issues/771","repository_url":"https://api.github.com/repos/kubernetes-sigs/aws-alb-ingress-controller","labels_url":"https://api.github.com/repos/kubernetes-sigs/aws-alb-ingress-controller/issues/771/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes-sigs/aws-alb-ingress-controller/issues/771/comments","events_url":"https://api.github.com/repos/kubernetes-sigs/aws-alb-ingress-controller/issues/771/events","html_url":"https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/771","id":388208498,"node_id":"MDU6SXNzdWUzODgyMDg0OTg=","number":771,"title":"Error with ingress about subnets and target groups","user":{"login":"jitesh-prajapati123","id":19203741,"node_id":"MDQ6VXNlcjE5MjAzNzQx","avatar_url":"https://avatars0.githubusercontent.com/u/19203741?v=4","gravatar_id":"","url":"https://api.github.com/users/jitesh-prajapati123","html_url":"https://github.com/jitesh-prajapati123","followers_url":"https://api.github.com/users/jitesh-prajapati123/followers","following_url":"https://api.github.com/users/jitesh-prajapati123/following{/other_user}","gists_url":"https://api.github.com/users/jitesh-prajapati123/gists{/gist_id}","starred_url":"https://api.github.com/users/jitesh-prajapati123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitesh-prajapati123/subscriptions","organizations_url":"https://api.github.com/users/jitesh-prajapati123/orgs","repos_url":"https://api.github.com/users/jitesh-prajapati123/repos","events_url":"https://api.github.com/users/jitesh-prajapati123/events{/privacy}","received_events_url":"https://api.github.com/users/jitesh-prajapati123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-06T13:14:11Z","updated_at":"2018-12-06T17:52:17Z","closed_at":null,"author_association":"NONE","body":"I am getting following errors highlighted in **bold**. Please check attached yaml.\r\n\r\nW1206 11:47:08.348514       1 client_config.go:552] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.\r\n-------------------------------------------------------------------------------\r\nAWS ALB Ingress controller\r\n  Release:    v1.0.1\r\n  Build:      git-ebac62dd\r\n  Repository: https://github.com/kubernetes-sigs/aws-alb-ingress-controller.git\r\n-------------------------------------------------------------------------------\r\n**### E1206 11:47:54.458578       1 :0] kubebuilder/controller \"msg\"=\"Reconciler error\" \"error\"=\"failed to reconcile targetGroups due to failed to load serviceAnnotation due to no object matching key \\\"default/service1\\\" in local store\"  \"Controller\"=\"alb-ingress-controller\" \"Request\"={\"Namespace\":\"default\",\"Name\":\"alb-eks-dev-ingress\"}**\r\n------------------------------------------------------------------------\r\n**### E1206 11:47:55.459306       1 :0] kubebuilder/controller \"msg\"=\"Reconciler error\" \"error\"=\"failed to build LoadBalancer configuration due to retrieval of subnets failed to resolve 2 qualified subnets. Subnets must contain the kubernetes.io/cluster/\\u003ccluster name\\u003e tag with a value of shared or owned and the kubernetes.io/role/internal-elb tag signifying it should be used for ALBs Additionally, there must be at least 2 subnets with unique availability zones as required by ALBs. Either tag subnets to meet this requirement or use the subnets annotation on the ingress resource to explicitly call out what subnets to use for ALB creation. The subnets that did resolve were []\"  \"Controller\"=\"alb-ingress-controller\" \"Request\"={\"Namespace\":\"2048-game\",\"Name\":\"2048-ingress\"}**\r\n\r\ningress.yaml\r\n`\r\napiVersion: extensions/v1beta1\r\nkind: Ingress\r\nmetadata:\r\n  name: alb-eks-dev-ingress\r\n  labels:\r\n    app: alb-eks-dev\r\n  annotations:\r\n    # trigger the alb-ingress-controller\r\n    kubernetes.io/ingress.class: alb\r\n    \r\n    # set ALB parameters\r\n    alb.ingress.kubernetes.io/scheme: internet-facing\r\n    alb.ingress.kubernetes.io/target-type: instance\r\n    alb.ingress.kubernetes.io/security-groups: sg-03fddf828ea7cd3eb\r\n    alb.ingress.kubernetes.io/subnets: subnet-0ffe7c5009c4bc894,subnet-0f6576de092e78ba5\r\n    alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-1:374323471964:certificate/65bfa94c-69c9-48cd-8c8c-86b9ac49cb3d\r\n    alb.ingress.kubernetes.io/listen-ports: '[{\"HTTP\":80,\"HTTPS\": 443}]'\r\n    \r\n    # allow 404s on the health check\r\n    alb.ingress.kubernetes.io/healthcheck-path: \"/\"\r\n    alb.ingress.kubernetes.io/success-codes: '200,404'\r\nspec:\r\n  rules:\r\n  - http:\r\n      paths:\r\n      - path: \"/service1\"\r\n        backend:\r\n          serviceName: service1\r\n          servicePort: 3001\r\n`\r\n\r\nservice1.yaml\r\n`\r\n{\r\n   \"apiVersion\":\"v1\",\r\n   \"kind\":\"Service\",\r\n   \"metadata\":{\r\n      \"name\":\"service1\",\r\n      \"labels\":{\r\n         \"app\":\"service1\"\r\n      }\r\n   },\r\n   \"spec\":{\r\n      \"ports\": [\r\n         {\r\n           \"port\":80,\r\n           \"targetPort\":3001\r\n         }\r\n      ],\r\n      \"selector\":{\r\n         \"app\":\"service1\"\r\n      },\r\n      \"type\": \"NodePort\"\r\n   }\r\n}\r\n`\r\n[service_nodeport.txt](https://github.com/kubernetes-sigs/aws-alb-ingress-controller/files/2653170/service_nodeport.txt)\r\n[ingress.txt](https://github.com/kubernetes-sigs/aws-alb-ingress-controller/files/2653172/ingress.txt)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes-sigs/aws-alb-ingress-controller/issues/comments/444965502","html_url":"https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/771#issuecomment-444965502","issue_url":"https://api.github.com/repos/kubernetes-sigs/aws-alb-ingress-controller/issues/771","id":444965502,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDk2NTUwMg==","user":{"login":"M00nF1sh","id":40677631,"node_id":"MDQ6VXNlcjQwNjc3NjMx","avatar_url":"https://avatars0.githubusercontent.com/u/40677631?v=4","gravatar_id":"","url":"https://api.github.com/users/M00nF1sh","html_url":"https://github.com/M00nF1sh","followers_url":"https://api.github.com/users/M00nF1sh/followers","following_url":"https://api.github.com/users/M00nF1sh/following{/other_user}","gists_url":"https://api.github.com/users/M00nF1sh/gists{/gist_id}","starred_url":"https://api.github.com/users/M00nF1sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M00nF1sh/subscriptions","organizations_url":"https://api.github.com/users/M00nF1sh/orgs","repos_url":"https://api.github.com/users/M00nF1sh/repos","events_url":"https://api.github.com/users/M00nF1sh/events{/privacy}","received_events_url":"https://api.github.com/users/M00nF1sh/received_events","type":"User","site_admin":false},"created_at":"2018-12-06T17:52:17Z","updated_at":"2018-12-06T17:52:17Z","author_association":"COLLABORATOR","body":"Hi,\r\n1.  I suppose the above error only happens before you added the `alb.ingress.kubernetes.io/subnets:` annotation, am i correct? \r\nThe error message is misleading, you need to add `kubernetes.io/role/elb` tag onto public subnets instead of `kubernetes.io/role/internal-elb` to let controller auto-discovery it for internet-facing ingresses.\r\n\r\n2. What's the new logs after you applied the `alb.ingress.kubernetes.io/subnets` annotation?\r\n\r\n\r\n"}}
{"actor":{"display_login":"M00nF1sh"}}