Comments (4)
The ingress is exposed via a loadbalancer. the default loadbalancer for k3s is servicelb, which is documented here: https://docs.k3s.io/networking/networking-services#service-load-balancer
The docs cover limiting which nodes the loadbalancer uses.
from k3s.
yes that is the documentation I said I was following.
I tried putting the labels everywhere without success (as I explained)
I have no clue what is missing right now. So, there is one problem:
- documentation is imcomplete/unclear
- documentation has a bug
- or the implementation has a bug
Could you give me some pointers if that is just a documentation issue?
thanks
from k3s.
I downloaded K3S's code and it looks like the problem is that the k3s code is only selecting nodes for LoadBalancer
and if we check the "traefik" service that k3s installs, its LoadBalancer part doesn't have a svccontroller.k3s.cattle.io/lbpool
(so it picks all nodes).
So, in other words, that cannot work.
It seems I would need to:
- disable traefik
- install traefik myself with
- 2 services:
- traefik-tor1_1 : with
svccontroller.k3s.cattle.io/lbpool=tor1_1
- traefik-fra1_1 : with
svccontroller.k3s.cattle.io/lbpool=fra1_1
- traefik-tor1_1 : with
- 2 Ingress classes
- traefik-tor1_1
- traefik-fra1_1
- 2 services:
- Then, I will be able to set on my
Ingress
theingressClassName
for the right load-balancer pool to use.
You might consider automatically doing that. For instance, when svccontroller.k3s.cattle.io/enablelb=true
, you could split traefik like that.
What do you think?
from k3s.
if we check the "traefik" service that k3s installs, its LoadBalancer part doesn't have a svccontroller.k3s.cattle.io/lbpool
It is easy enough to do that for yourself, if that's something you want. Most people don't.
If you just wanted the ingress to only use a single node, you could just only label that node with svccontroller.k3s.cattle.io/enablelb=true
and do nothing else; nodes that don't have that label will not be used for servicelb.
If you want more fine grained control, you could:
- Label the node you want the ingress to use with
svccontroller.k3s.cattle.io/lbpool=traefik
andsvccontroller.k3s.cattle.io/enablelb=true
- Add a HelmChartConfig to add this same label to the traefik service, as described at https://docs.k3s.io/helm#customizing-packaged-components-with-helmchartconfig
apiVersion: helm.cattle.io/v1 kind: HelmChartConfig metadata: name: traefik namespace: kube-system spec: valuesContent: |- service: labels: svccontroller.k3s.cattle.io/lbpool: traefik
If you want to be able to use different ingress classes for different nodes then yes, that will take much more customization and likely multiple installations of the traefik ingress controller, each bound to its own service and lbpool.
from k3s.
Related Issues (20)
- k3s kube-system pods failure when using --bind-address HOT 4
- Can we upgrade Traefik to version 3. x?
- Can we make the busybox images configurable?
- Strimzi is unable to deploy Kafka with LoadBalancer
- Add mention of MariaDB support?
- Failure to read certificates and key files during k3s certificate rotate-ca HOT 4
- Getting net.ipv6.conf.all.forwarding=1 restriction when using IPv4 ipFamily with ipFamilyPolicy SingleStack HOT 1
- tls: failed to verify certificate: x509: certificate is valid for *. traefik. default, not docker. io.
- Incompatible change in patch version breaks downstream/ users of k3s HOT 3
- Inacuracy in documentation? HOT 1
- [Release-1.30] - Customize servicelb daemonset tolerations (traefik) HOT 1
- [Release-1.29] - Customize servicelb daemonset tolerations (traefik) HOT 1
- [Release-1.28] - Customize servicelb daemonset tolerations (traefik) HOT 1
- [Release-1.27] - Customize servicelb daemonset tolerations (traefik) HOT 1
- `k3s-killall.sh` does not work if data-dir doesn't end with `/k3s` HOT 3
- Allow users to use letsencript certificates when they install k3s HOT 5
- MariaDB support? HOT 1
- Bump coredns to v1.11.3
- How to add multiple parameter values for the --kube-apiserver-arg option in the K3s service. HOT 1
- Flannel Dualstack crash on 1.30.3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k3s.