How to enable kube-router's load balance feature under k0s?

hi, community.

I just land on k0s two weeks ago, am going to utilize kube-router as all in one solution, but don’t know how to enable kube-router’s service, load balancer feature?

Hi, are you referring to running kube router with the flag --run-service-proxy=true? If so, the kuberouter component controller currently has it hardcoded to false.

The best option you have is setting in the k0s configuration spec.network.provider: custom and deploy kuberouter on your own.

To deploy it you can either follow kuberouter’s upstream documentation, or you can get the contents of /var/lib/k0s/manifests/kuberouter from a default installation and copy it into the cluster with custom network provider and make the modifications you consider necessary. Keep in mind k0s will not upgrade kuberouter as you upgrade your cluster, you’ll have to manage kuberouter upgrades on your own.

On a side note I believe running with --run-service-proxy=truewill have some conflicts with kubeproxy, you can disable kubeproxy entirely by adding the flag --disable-components=kubeproxyto k0s.

Regarding making this a configurable parameter, the change itself is quite simple but doing this means we must test this properly and also support it, which I’m not quite sure we want to do. You can make a feature request in Issues · k0sproject/k0s · GitHub which we need to evaluate and if there are good reasons to do it we’ll think about it.

Thanks for your explanation. I will try the custom installation method first and report back. I had been heard that kube-router is simpler than other cni such as calico, cillium. and k0s have been treated it as the default cni. why don’t just support all configuration by default?

Hi,

Having a feature means that we have to maintain it, which means properly testing it and at some point debugging/fixing it. We’re open to new features and suggestions are always welcome, but we have limited resources and we can only implement well justified requests.

As far as I know, kube-proxy has every feature of kube-router’s service proxy but kube-router is missing some features such as LoadBalancer services. Kube-proxy is VERY tested and I don’t know anyone using this service proxy. I’m not familiar with kube-router’s service proxy details so it’s likely that I’m missing something important… If so please let us know.

Side note: A similar issue has been raised on GitHub: Allow replace kube-proxy by kube-router Service Proxy · Issue #3943 · k0sproject/k0s · GitHub

1 Like