question on k8 provider. I have deployed a deploym...
# kubernetes
h
question on k8 provider. I have deployed a deployment, service and an ingress component ti an aws eks cluster. Doesn't k8 require an ingress controller and i couldn't find in in the api docs for k8 provider? Are we supposed to deploy a alb for this need?
g
FYI this is likely outside the scope of the k8s provider itself, but wanted to offer some assistance. You will need to deploy an Ingress controller. Kubernetes has deferred the actual load balancing responsibility for Ingress to those. A couple options, if you're in AWS for example (I think AKS/Azure, GKE/Google have their versions as well): • https://github.com/kubernetes-sigs/aws-load-balancer-controller: the official AWS-blessed ingress controller that can use standard L7 ALBs, and L4 NLBs (for TCP/UDP only). • NGINX Ingress (NLB) controller [gives you more flexibility and control by having an internal set of NGINX proxies act as your LoadBalancing suite]: https://kubernetes.github.io/ingress-nginx/ Im' sure there are others out there, which, case in point, is why k8s decided to leave this up to you on how you want to handle traffic coming into the clusters.
h
Thanks a bunch @gorgeous-minister-41131 . so it seems like i need to deploy them outside of the Pulumi k8 provide - i am assuming we can use the @aws package to deploy a alb etc.
g
If you want to manually manage the ALBs you can, but you'll still need the controller so that the Ingress resources can attach to and/or reconcile with it using TargetGroupBindings. I would recommend using pulumi (dogfooding) the
helm.v3.Chart
resource to deploy the ALB controller helm chart. Make sure your EKS worker nodes have an appropriate IAM role for permission or use IRSA for the controller pod ServiceAccounts.. You probably already knew, but https://www.pulumi.com/registry/packages/kubernetes/api-docs/helm/v3/chart/ this can install 3rd party Helm charts with ease so you don't have to use helm directly, or helmfile.
Lastly, you can actually manage these TargetGroupBindings using pulumi by leveraging the
CustomResource
resource: https://www.pulumi.com/registry/packages/kubernetes/api-docs/apiextensions/customresource/
so if you defined your ALB and targetGroup outside of the controller (e.g. aws package), you could pass the output ARNs into these ^ so you don't have to hard-code it or split the project stack up.
h
thanks for all the pointers. For us as we are a product company, we are making it work with NO code for users / so creating a template that an end user can just drag and drop and update properties etc. So a few more challenges for us !!! than just deploying this to aws. But your pointers will help.