4 ms·
Does anyone use k8s clusters that don't come with Ingress these days? This article exposes a lot of complexity for what should just be "use ingress". More adva
by cpitman 5y ago
Does anyone use k8s clusters that don't come with Ingress these days? This article exposes a lot of complexity for what should just be "use ingress".
More advanced ways to get traffic into the cluster are only really needed for non-https traffic. It comes up, but way more rarely.
- alexellisuk 5y agoHow does "just using ingress" work on your local cluster with K3d/KinD/minikube/Docker Desktop etc? There are so many options, and Ingress isn't the answer for those. Ingress isn't a thing that can receive traffic, Ingress Controller is and it - itself has to be exposed somehow, on port 80 and 443. The lowest common denominator is the one which works everywhere - kubectl port-forward. After that, hobbyists have a propensity for MetalLB, but it's not strictly safe at work with advertising ARP ranges. I think the takeaway is YMMV. For production, it's of course Ingress Controller plus a cloud-managed LoadBalancer.
- nickjj 5y ago> How does "just using ingress" work on your local cluster with K3d/KinD/minikube/Docker Desktop etc? The nginx ingress controller works great when running on a local cluster using KinD and others. You can drop it in and it works, then for the hostname + path combo in your ingress config you can use a combo that produces URLs like `localhost/myapp/test` or `localhost/myapp/prod` to test different app + environment combos if you were using Kustomize or Helm variables. No port forwarding or extra tooling needed. This lets you keep things fairly simple at the Kubernetes level where all services end up being a ClusterIP type and then you hook up an ingress to the services you want to route traffic to from outside of your cluster. The same ends up working in production except you'd use your cloud provider's ingress controller instead if they happen to have one (such as the AWS Load Balancer Controller). From your service's point of view nothing changes, the ingress config is also mainly the same except for a few different annotations being set which is easy to account for with Kustomize or Helm. This gives you a consistent interface to your services in any environment.
- mywaifuismeta 5y agoEven k3s/k3d (I haven't used the others but I assume it's the same) comes with ingress controllers built-in, Traefik in the case of k3s, but it's easy to switch to nginx. So the OP is right, this is unnecessary complexity, and it really is just an ingress, even in a local cluster.
- moondev 5y agoYou can launch kind clusters with some nodeports binded to your workstation, they are just docker containers after all. My favorite way is to use metallb - simply deploy it with the same subnet cidr of your docker kind network and your loadbalancer services will be routable from your workstation
- craftkiller 5y agoYes! I use Vultr for my personal kubernetes clusters and it does not come with an ingress controller. > Does VKE come with an ingress controller? > No, VKE does not come with an ingress controller preconfigured. Vultr Load Balancers will work with any ingress controller you deploy. Popular ingress controllers include Nginx, HAProxy, and Traefik. (as an aside: VKE is in beta and they absolutely actually mean "beta". It has many issues that need to be resolved (for example, I haven't been able to connect to the control plane for weeks because of a memory leak) so at this time I'd only recommend trying them out for non-mission-critical stuff. I would have been fired by now if I had ported my startup over to this.)
- nodesocket 5y agoAdditionally with Vultr VKE the control plane is exposed to the public without any way to whitelist source ip addresses. I asked them to support white listings of IPs as a bare minimum.