Post AohVQo7IgPMQWaRLNo by mijndert@fosstodon.org
 (DIR) More posts by mijndert@fosstodon.org
 (DIR) Post #AohIeGK3pKd0McUhCy by stfn@fosstodon.org
       2024-12-04T09:09:22Z
       
       0 likes, 0 repeats
       
       Hi #kubernetes people,I am at the beginning of my k8s journey, so the questions will be super basic :)I am running k3s on a single node. I have a deployment with a NodePort service. I also trying to do a LoadBalancer service.The NodePort I can reach from a different machine in the LAN, the LoadBalancer service is not reachable. I am going throught the docs of course, but maybe someone could give me a simple answer? :DAll details on the screenshot
       
 (DIR) Post #AohIiI4nFSxexfH27U by stfn@fosstodon.org
       2024-12-04T09:10:05Z
       
       0 likes, 0 repeats
       
       And what is used then to reach the cluster on a normal port like 80? Traefik? Nginx ingress controller?
       
 (DIR) Post #AohIndC0AMOxtsBxoG by stfn@fosstodon.org
       2024-12-04T09:11:03Z
       
       0 likes, 0 repeats
       
       Seriously, Docker for me is relatively simple and understandable, but Kubernetes, is like Docker times one thousand, Docker on a high mountain
       
 (DIR) Post #AohLyywTwQP8P52LOy by KevinGimbel@fosstodon.org
       2024-12-04T09:46:42Z
       
       0 likes, 0 repeats
       
       @stfn k8s makes sense when you're trying to manage hundreds of containers across multiple servers. It's def harder to get into compared to docker and docker-compose. As for your Load Balancer I assume it isn't connected to the service - I think there should be some label selector assigned to it.
       
 (DIR) Post #AohOP4PcQVZyo1EVAu by stfn@fosstodon.org
       2024-12-04T10:13:51Z
       
       0 likes, 0 repeats
       
       @KevinGimbel The LB is connected to the deployment, it's the first argument.
       
 (DIR) Post #AohOWqyMHLlPRLC3F2 by stfn@fosstodon.org
       2024-12-04T10:15:14Z
       
       0 likes, 0 repeats
       
       @jorijn Thank you for you help and kind words :)Actually, k3s provides its own LB, that's why the external IP is there. That was the main source of my confusion, opening the external IP (which is the LAN IP of my only node) on that port does not work
       
 (DIR) Post #AohOnJNSRDuIAYmUyW by stfn@fosstodon.org
       2024-12-04T10:18:13Z
       
       0 likes, 0 repeats
       
       @jorijn @KevinGimbel Interesting, I changed the port in the Load Balancer to 80, now the external IP is pending, but I can reach the cluster on the IP of the node, and the port of the load balancer (192.168.10.250:31362)
       
 (DIR) Post #AohPivxRfZ76KZ5fzE by stfn@fosstodon.org
       2024-12-04T10:28:37Z
       
       0 likes, 0 repeats
       
       @jorijn @KevinGimbel I think it's clear now. The service in the container is listening on port 80. The pod is exposing port 80. The Load Balancer is talking to the pod, and translates the pod's port 80 to the port of the LB. The NodePort service is a separate thing, and I set it to translate the container's port 80 to node port 8080, which is then again translated to 30158.
       
 (DIR) Post #AohPztoyrlQGcxDlqa by stfn@fosstodon.org
       2024-12-04T10:31:42Z
       
       0 likes, 0 repeats
       
       @jorijn @KevinGimbel And if I were to deploy this, for example to EKS, there would be another Load Balancer provide by the cloud service, like ELB, which would talk to this k3s Load Balancer, and translate the port to 80, handle TLS and DNS, right?
       
 (DIR) Post #AohQFiP15YXxqVcO4e by stfn@fosstodon.org
       2024-12-04T10:34:33Z
       
       0 likes, 0 repeats
       
       @jorijn @KevinGimbel Awesome, thank you so much :)
       
 (DIR) Post #AohVQo7IgPMQWaRLNo by mijndert@fosstodon.org
       2024-12-04T11:32:35Z
       
       0 likes, 0 repeats
       
       @stfn @jorijn @KevinGimbel bunch of nerds
       
 (DIR) Post #AoiTV5YNn1jb0nytkG by stfn@fosstodon.org
       2024-12-04T22:45:40Z
       
       0 likes, 0 repeats
       
       @jorijn @KevinGimbel Right, thank you, will continue diving into it
       
 (DIR) Post #AoiTWnOoG53nHoJkXY by stfn@fosstodon.org
       2024-12-04T22:45:59Z
       
       0 likes, 0 repeats
       
       @mijndert @jorijn @KevinGimbel that is indeed true about me