Here's my ingress manifest:
{{- $values := index .Values .Values.region .Values.env -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: load-balancer
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/certificate-arn: {{ $values.cert_arn }}
alb.ingress.kubernetes.io/target-type: pod
alb.ingress.kubernetes.io/subnets: {{ $values.subnets | join "," }}
alb.ingress.kubernetes.io/security-groups: {{ $values.security_groups | join "," }}
alb.ingress.kubernetes.io/healthcheck-path: /ping
spec:
rules:
- host: "*.{{ $values.domain }}"
http:
paths:
- path: /api
backend:
serviceName: sa-api
servicePort: 80
- backend:
serviceName: sa-web
servicePort: 80
And here are the ingress controller's logs:
$ kubectl logs --namespace kube-system pod/alb-ingress-controller-69c85985-f2lm7
I0717 00:39:15.736798 1 main.go:24] [ALB-INGRESS] [controller] [INFO]: Log level read as "", defaulting to INFO. To change, set LOG_LEVEL environment variable to WARN, ERROR, or DEBUG.
I0717 00:39:15.737044 1 launch.go:112] &{ALB Ingress Controller 1.0-beta.4 git-385f5365 git://github.com/kubernetes-sigs/aws-alb-ingress-controller}
I0717 00:39:15.737062 1 launch.go:115] Watching for ingress class: alb
I0717 00:39:15.737176 1 launch.go:282] Creating API client for https://172.20.0.1:443
I0717 00:39:15.752926 1 launch.go:294] Running in Kubernetes Cluster version v1.10 (v1.10.3) - git (clean) commit 2bba0127d85d5a46ab4b778548be28623b32d0b0 - platform linux/amd64
I0717 00:39:15.756745 1 launch.go:134] validated kube-system/default-http-backend as the default backend
I0717 00:39:15.765292 1 alb-controller.go:121] [ALB-INGRESS] [controller] [INFO]: Ingress class set to alb
I0717 00:39:15.765310 1 alb-controller.go:130] [ALB-INGRESS] [controller] [INFO]: albNamePrefix undefined, defaulting to 7506d366
I0717 00:39:15.983826 1 albingresses.go:83] [ALB-INGRESS] [ingress] [INFO]: Building list of existing ALBs
I0717 00:39:16.143569 1 albingresses.go:91] [ALB-INGRESS] [ingress] [INFO]: Fetching information on 0 ALBs
I0717 00:39:16.184331 1 albingresses.go:108] [ALB-INGRESS] [ingress] [INFO]: Assembled 0 ingresses from existing AWS resources in 200.476784ms
I0717 00:39:16.184362 1 controller.go:1359] starting Ingress controller
I0717 00:39:16.190035 1 event.go:218] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"load-balancer", UID:"c915abd8-8958-11e8-a69e-1254143763fe", APIVersion:"extensions", ResourceVersion:"3197387", FieldPath:""}): type: 'Normal' reason: 'CREATE' Ingress default/load-balancer
I0717 00:39:16.441948 1 leaderelection.go:174] attempting to acquire leader lease...
W0717 00:39:16.442010 1 controller.go:639] service kube-system/default-http-backend does not have any active endpoints
W0717 00:39:16.442076 1 controller.go:639] service kube-system/default-http-backend does not have any active endpoints
W0717 00:39:16.442089 1 controller.go:639] service kube-system/default-http-backend does not have any active endpoints
I0717 00:39:16.442186 1 controller.go:477] backend reload required
I0717 00:39:16.448426 1 status.go:193] new leader elected: alb-ingress-controller-7447954ddb-6bd5p
E0717 00:39:17.061781 1 albingress.go:143] [ALB-INGRESS] [default/load-balancer] [ERROR]: Error instantiating load balancer: default/sa-api service is not of type NodePort
I0717 00:39:17.061840 1 event.go:218] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"load-balancer", UID:"c915abd8-8958-11e8-a69e-1254143763fe", APIVersion:"extensions", ResourceVersion:"3197387", FieldPath:""}): type: 'Warning' reason: 'ERROR' Error instantiating load balancer: default/sa-api service is not of type NodePort
I0717 00:39:17.061864 1 controller.go:486] ingress backend successfully reloaded...
I0717 00:39:19.090554 1 controller.go:477] backend reload required
E0717 00:39:19.212935 1 albingress.go:143] [ALB-INGRESS] [default/load-balancer] [ERROR]: Error instantiating load balancer: default/sa-api service is not of type NodePort
I0717 00:39:19.212967 1 controller.go:486] ingress backend successfully reloaded...
I0717 00:39:19.212974 1 event.go:218] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"load-balancer", UID:"c915abd8-8958-11e8-a69e-1254143763fe", APIVersion:"extensions", ResourceVersion:"3197387", FieldPath:""}): type: 'Warning' reason: 'ERROR' Error instantiating load balancer: default/sa-api service is not of type NodePort
Thanks for the help!
hi @bigkraig , how do I get this patch? I am still seeing this error in my testing.
Upgrade to the latest release image, 1.0-beta.6
@bigkraig Thanks for you rapid response!!
So I upgraded my alb-ingress-controller and verified that by seeing 1.0-beta.6 showing up in my alb-ingress-controller Deployment's log.
However, now I am seeing this error:
Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"analysisserversingress", UID:"b393295d-a001-11e8-a602-0a4b199a2d8e", APIVersion:"extensions/v1beta1", ResourceVersion:"4162080", FieldPath:""}): type: 'Warning' reason: 'ERROR' error parsing annotations: the annotation target-type does not contain a valid value
The ingress yaml I am trying to deploy looks like this:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: analysisserversingress
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/target-type: pod
alb.ingress.kubernetes.io/subnets: subnet-abc12345
alb.ingress.kubernetes.io/security-groups: sg-abc12345
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: Environment=dev,Team=test,kubernetes.io/role/elb=yes,kubernetes.io/cluster/mycluster=shared
spec:
rules:
- http:
paths:
- path: /test
backend:
serviceName: myservice
servicePort: 33443
swap it out to ip
It works now. Thank you Kraig you the rockstar!
I have the same problem. Kraig, What do you mean to swap it out to ip
The correct annotation is alb.ingress.kubernetes.io/target-type: ip. See the annotation docs.
Most helpful comment
The correct annotation is
alb.ingress.kubernetes.io/target-type: ip. See the annotation docs.