Hello,
I currently have applications across two namespaces. I've spun up an alb-ingress-controller with the --watch-namespace parameter pointing to the first namespace, which works as expected.
When I spin up the second alb-ingress-controller, the controller pod gets to the "running" state however, the alb itself does not get provisioned. The logs show the controller waiting for a leader lease (not sure what that is exactly).
`AWS ALB Ingress controller
Release: v1.1.2
Build: git-cc1c5971
W0726 23:36:01.489292 1 client_config.go:549] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0726 23:36:01.552747 1 :0] kubebuilder/controller "level"=0 "msg"="Starting EventSource" "controller"="alb-ingress-controller" "source"={"Type":{"metadata":{"creationTimestamp":null}}}
I0726 23:36:01.553445 1 :0] kubebuilder/controller "level"=0 "msg"="Starting EventSource" "controller"="alb-ingress-controller" "source"={"Type":{"metadata":{"creationTimestamp":null},"spec":{},"status":{"loadBalancer":{}}}}
I0726 23:36:01.553525 1 :0] kubebuilder/controller "level"=0 "msg"="Starting EventSource" "controller"="alb-ingress-controller" "source"=
I0726 23:36:01.553769 1 :0] kubebuilder/controller "level"=0 "msg"="Starting EventSource" "controller"="alb-ingress-controller" "source"={"Type":{"metadata":{"creationTimestamp":null},"spec":{},"status":{"loadBalancer":{}}}}
I0726 23:36:01.553806 1 :0] kubebuilder/controller "level"=0 "msg"="Starting EventSource" "controller"="alb-ingress-controller" "source"=
I0726 23:36:01.553955 1 :0] kubebuilder/controller "level"=0 "msg"="Starting EventSource" "controller"="alb-ingress-controller" "source"={"Type":{"metadata":{"creationTimestamp":null}}}
I0726 23:36:01.554383 1 :0] kubebuilder/controller "level"=0 "msg"="Starting EventSource" "controller"="alb-ingress-controller" "source"={"Type":{"metadata":{"creationTimestamp":null},"spec":{},"status":{"daemonEndpoints":{"kubeletEndpoint":{"Port":0}},"nodeInfo":{"machineID":"","systemUUID":"","bootID":"","kernelVersion":"","osImage":"","containerRuntimeVersion":"","kubeletVersion":"","kubeProxyVersion":"","operatingSystem":"","architecture":""}}}}
I0726 23:36:01.554568 1 leaderelection.go:205] attempting to acquire leader lease kube-system/ingress-controller-leader-alb...`
How do I get the second alb-ingress-controller to cycle through the provisioning of the second alb?
Hi, do you end up being able to solve this issue?
At the time of our implementation, AWS had some limitations in regards to the alb-ingress-controller.
I ended up spinning up a single instance of the controller without the --watch-namespace switch. Each namespace then has its own ingress in which you specify the ingress-class. This is in turn provisions an alb with the ingress rules specified. Hope that helps.
For anyone who stumbles upon this, the trick is to create a new config map ( kubectl create configmap second-ingress-controller-leader-alb -n kube-system) and specify the same in the alb-ingress-controller.yaml file with “- --election-id=second-ingress-controller-leader-alb” https://github.com/kubernetes-sigs/aws-alb-ingress-controller/blob/master/cmd/options.go also has boolean “election” and I am not sure what would be the effect of setting “election” to false.
In my setup , I have one ALB Ingress Controller on private subnet and one ALB Ingress Controller on public subnet.
Most helpful comment
For anyone who stumbles upon this, the trick is to create a new config map ( kubectl create configmap second-ingress-controller-leader-alb -n kube-system) and specify the same in the alb-ingress-controller.yaml file with “- --election-id=second-ingress-controller-leader-alb” https://github.com/kubernetes-sigs/aws-alb-ingress-controller/blob/master/cmd/options.go also has boolean “election” and I am not sure what would be the effect of setting “election” to false.
In my setup , I have one ALB Ingress Controller on private subnet and one ALB Ingress Controller on public subnet.