cool-sunset-23736
07/17/2022, 4:46 PM/etc/confd/values.yaml
file. Is this a shared volume between the nodes or is there some other mechanism in play?wide-garage-9465
07/17/2022, 7:25 PMcool-sunset-23736
07/17/2022, 8:21 PMwide-garage-9465
07/17/2022, 8:25 PMtype: LoadBalancer
.
It checks the desired port and tries to expose it on any node in the cluster using a proxy pod with hostPort
exposed. The externalIP
will then be the IP of that node.cool-sunset-23736
07/17/2022, 8:27 PMwide-garage-9465
07/17/2022, 8:29 PMcool-sunset-23736
07/17/2022, 8:31 PMwide-garage-9465
07/17/2022, 8:44 PMThis works by using a host port for each service load balancer and setting up iptables to forward the request to the cluster IP. The regular k8s scheduler will find a free host port. If there are no free host ports, the service load balancer will stay in pending.
cool-sunset-23736
07/17/2022, 8:51 PMYou're example on k3d is only valid if you have only a single node. But in that case it would be valid everywhere.Isn't that the premise of k3d, that you have a single docker host which can than run multiple k3s nodes in docker? Or is it possible to run k3d on multiple machines? Regarding Klipper. https://rancher.com/docs/k3s/latest/en/networking/#how-the-service-lb-works
K3s creates a controller that creates a Pod for the service load balancer, which is a Kubernetes object of kind Service.
For each service load balancer, a DaemonSet is created. The DaemonSet creates a pod with theprefix on each node.svc
...
...
wide-garage-9465
07/17/2022, 9:34 PMIf you try to create a Service LB that listens on port 80, the Service LB will try to find a free host in the cluster for port 80. If no host with that port is available, the LB will stay in Pending.
which wouldn't make sense it the proxies would be DaemonSets, which would cover all hosts.