Hacker News new | ask | show | jobs
by tacticus 2749 days ago
The only problem with the gke solution is loadbalancers :( It's weird that a signle LB rule costs more than the rest of the kube cluster
1 comments

If you want to use your worker nodes as load balancers via Ingress, to do this on the super cheap without provisioning any Load Balancers, then you can also do that. (FWIW, DigitalOcean charges for load balancers too, and you can avoid spending on using them in the same ways. I think they are cheaper though...)

The thing to look up is nginx-ingress settings for DaemonSet and HostNetwork mode. The settings to use might be slightly different on GKE. I can give you the one-liner I use to make it work on DO/Kops, here:

helm install stable/nginx-ingress --name ingress --namespace nginx-ingress --set controller.hostNetwork=true,controller.daemonset.useHostPort=true,controller.kind=DaemonSet,controller.service.type=NodePort

That last setting about NodePort may be extraneous, I think you can skip it... actually now come to think of it, I think that is the part that prevents the ingress from provisioning a Load Balancer in front of itself.

Note of course, that there is a reason why (it is the default and) you may be inclined to purchase a load balancer, as doing it this way is fairly likely to turn out to be not only less reliable, but also super inconvenient in a lot of ways. Not "nasal demons" inconvenient, but...