Hmm, I need to add the ALB (ingress) address to ro...
# general
f
Hmm, I need to add the ALB (ingress) address to route53. One approach was to reference the ALB using
static get()
but there is no way of knowing the name of the ALB created. Another approach is to print the ingress using kubectl and use the address with https://github.com/pulumi/pulumi-query-kubernetes But the question is, is it lazy? As if will it wait until the cluster has been setup?
w
This is for an ALB created by Kubernetes on your behalf? Can you read
ingress.status.loadBalancer.ingress[0].hostname
off of the ingress object?
f
You mean using kube-query or by using a static get method on network/beta1/ingress?
I am actually considering creating ALB from pulumi instead and managing it manually but I am not sure what the consequences are.
I would rather prefer that as the alb-ingress project doesn’t let you name anything. It makes using cloud watch custom metrics really tricky if you got multiple clusters with multiple ALBs.
w
I mean just from within your Pulumi program. Get the
ingress
object that created with on your behalf (if it's from Helm,
getResource
on the chart). If ALB Ingress allows your to bring-your-own-ALB, that definitely gives you much more control (I wish more Kubernetes things were like that).
f
Oh, I can access the ingress from the chart? I did not know that.
I see now, the ALB address is part of the ingress, and not the controllers.
@white-balloon-205 Well I mean, isn’t the custom resource ALB Ingress Controller technically just setting up an ALB and adding the nodes to it with some config? Why couldn’t I just setup an ALB for my EKS without installing their helm charts?
I am probably missing something.
@white-balloon-205 Could you confirm wether or not creating an ingress and accessing
status.loadBalancer.ingress[0].hostname
is the same as calling
kubectl get ingress …
and reading the address on it? Fyi you might want to update https://www.pulumi.com/blog/kubernetes-ingress-with-aws-alb-ingress-controller-and-pulumi-crosswalk/ as its using deprecated parts of the k8 extension.
w
Yes - reading ingress.status should be the same as reading the corresponding entry of kubectl get ingress.
f
Perfect.
w
Great catch on the blog post.
f
Was halfway through creating ALB from scratch over ClusterIP and an Ingress, lol.
w
Would you mind opening a GitHub issue in the pulumi/docs repo about the blog post? (Including what there is deprecated?).
f
To be clear
Copy code
new k8s.extensions.v1beta1.Deployment
is marked deprecated by you, not by K8.
In fact, everything under
k8s.extension
is deprecated.
w
Yep - got it - thought you meant something in the ALB Ingress itself.