dude you are really the first person to explain exactly what we need. Layed it all out perfectly, in nice detail and flow! Great job. First time see your vid. already subscribed and liked the video!
Thanks for the great content and explanation. I would have expected a lot more views and likes on your videos. Hopefully your channel will grow with time;))
Thank you, i have pretty much everything working on my ubuntu VPS but I'm unable to access my application from my local PC using the IP provided by metallb
Great videos and animations! I wonder what software you used to do that! Changing topics... how did you manage to have access to the "172.20.0.120" (LoadBalancer IP) from your computer (in mine I couldn't reach this IP) ? Are you using MacBook or Linux?
Confusing - Does MetalLB load-balance across multiple nodes OR multiple services? If i have 5 raspberry Pis running Service#1 of type load balancer, does metalLB load balance across nodes?
Great work I found this video after struggling with this stuff for a few weeks to create a testing environment. This would have saved me so much time. I am sharing this with my team to get them update to speed.
how can I apply this tutorial to a cluster deployed in ec2 instance....I can access deployed app as load balancer but I cannot access it using ingress...what Ip should I give to cloudflare dns...?
When I attempt to access the `web-app` using the assigned IP address with `curl 120.0.20.120`, the process hangs and timeouts. Does one need to update the /etc/hosts file here?
Hi, I have pfsense router at home and K8S bare metal running on ubuntu with 2 master 2 worker setup.. I configured BGP on pfsense and I am hoping it's good, the logs are showing the assigned LoadBalancer IPs but somehow I can't resolve them on browser... I tried multiple times but something somewhere missing, any clue where should I be looking at? I have External IPs assigned correctly on get service output and on pfsense. It does show external ip in BGP logs that the next hop if worker nodes but when I put them in browser, it's bad gateway!!
nice video ! had quick question , you have mapped host to the ip (172.20.0.120) inside /etc/hosts . is this metal lb ip ? or server ip where metal lb installed ?
Wonderful video! Thank you! I do have one question. Everything works great, but I am not clear on how I would be able to reach my services from a public URL or IP address. Without using an ingress and metallb, I would use nodeport. However, I am not seeing where or how to expose the ingress to internet connections. Any guidance would be most appreciated.
Hi, thanks for watching. You can use any IP address range with MetalLB even a publicly routable IP range as long as it is accessible on the node's ethernet segment. Another way to do it is to map an upstream public IP address range to the private range provisioned to MetalLB with port forwarding. This might require some extra configuration(probably through a custom mutating webhook admission controller) for the the public IP to show up as an externalIP on your LoadBalancer service.
If your nodes have static ips, can't you attach external HaProxy load balancer instead of all this? .. where all Haproxy sends traffic to either node at say port 31111 (where you have the ingress-controller running)? Is this is a much simpler solution than metallb?
I followed the tutorial but I cannot reach the external IP using curl. Should I change any dhcp settings in my router? I am using minikube to get the cluster running and the external IP is in the subnet of the cluster IP as well
Hi Morris, your video made my day! I was stuck for a long time on how a load balancer assigns an external IP to my ingress controller. Most youtube resources just briefly mentioned this flow but without showing an actual example like you did. Your diagrams are really helpful to explain how things fit together. A suggestion if you don't mind - if you can share the commands and files you used on github, it will help beginners like me a lot. Hope to see more videos from you.
Hi suntenslp3315, thanks for watching I am very glad you liked the video. Thanks for the suggestion too, and I will definitely make it a goal to do better documentation for the videos.
Great explanation but you should clearly state that this isn’t a production deployment plus metal lb shouldn’t be used in cloud but instead to be only leveraged in local or bare metal , unless I am mistaken. Please correct me
You are correct, the setup is for virtualisation environments where there are no cloud like load balancers to be leveraged like we have in AWS or GCP. For such virtualisation environments like Proxmox or VSphere MetalLB is a great solution and works perfectly well with home lab and production size clusters alike.
Just started learning Kubernetes and this is the most clear/concise explanation on services I've seen. Thanks for helping me get MetalLB running in my local test cluster. Great content Morris!
Hi @@EngineeringWithMorris I converted my service to CluterIP but it has an external IP address assigned from creation which matches the external IP address of the service/ingress-nginx-controller LoadBalancer. Comparing with the video, the ingress for the web-app doesn't have an IPAddress assign, it shows up empty. Which one's correct? When I do a curl to my host it doesn't show up anything.
Everything worked beautifully until I changed the deployment.yml file to remove the "Type: LoadBalancer" off. Now it won't connect to my container. I guess I'll have to plan around that limitation on my setup (RKE2). Thanks!
This video makes it look so simple and I think I am really close but I am still having some trouble understanding this setup / it's not working on my small home cluster. I have 3 nodes, 1 control-plane and 2 rasp pi nodes. I followed all this same setup but nothing seems to be spinning up. For the IP pool, is that my home IP address or the IP address of the device on my network that is listening on ports 80,443? In my case only 1 device on my network has port forwarding setup for them (The control-plane node).
I am assuming you are able to reach your k8s cluster network, meaning you can ping either a control-plane node or a worker node from your machine. For example if your cluster network is 192.168.1.0/24 and your nodes use the range say from 192.168.1.10 - 192.168.1.20, then you should choose a metallb ip pool in the same network like say 192.168.1.30 - 192.168.1.50. Just ensure no other devices are using these reserved ips.
Hi, I mostly use 1.27 and later. I have done a couple of videos on cluster setup you can check out below: K3S Lightweight Kubernetes Cluster Kubernetes at Home with Kubespray and Ansible
iam anticipating a high volume of incoming traffic to my Kubernetes cluster through Ingress controller, and iam worried about potential damage to cluster due to the heavy load. i want to scale, unfortunately i have no idea about what will i scale ? ingress or node or control plane ? ingress controller where will be run ? please reply this
Nice and crisp. I usually see training videos at 1.25 to 1.5 x speed. But As our freind Morris is so fast, this is the first time I slowed the video to .75 x😂. Solution worked for me
Thank you! I've been stuck with the problem for a couple of days. Came out that I had no L2 Advertisement applied to my MetalLB. Worked like a charm! :)
I really appreciated how straightforward this tutorial was. I finally managed to understand how metallb and nginx ingress controller can work in tandem and can now expose my k8s cluster to some external traffic. Thank you!
Nice video. Please i'd like to ask a question. please how do we come about those range of IP addresses? i reckon public IP addresses are not free and that range could clash with some existing public IP somewhere. Thnx
Exemplary work here - I've been trying to get a grasp on the k8s network ecosystem from the bare metal perspective for a couple of hours and this has been the best single resource.
thanks for the video Morris. I have a doubt - i see external Ip is assigned to the load balancer. but when i curl-ed it, it doesn't reach. how should i troubleshoot this?
Great explanation of the relationship between nginx and ingress! Previously I'd missed the point that needed to set the service back to clusterip. Am I right in thinking nginx is implicitly using metallb? I've been struggling to conceptualise that after reading the documentation.
Hi Alexander, thanks for watching. It is not absolutely necessary to revert the web app's service back to type ClusterIP in order for the web app to use NGINX Ingress. In such a scenario, access to the web app will be facilitated both through the external IP address(assigned by MetalLB) and the domain name which is pointing to NGINX Ingress' own LoadBalancer service external IP(also assigned by MetalLB). The reason for reverting back to ClusterIP is to conserve external IPs by freeing up the one used up by the web app.
Thank you for this video, it has been very useful for me. I have been trying to configure Metallb in my Kubernetes cluster for more than 15 days and I needed to create the L2Advertisement. Without this video it would never have worked for me. Thank you very much for the help.
Hi Morris, thanks for efforts in creating this tutorial. Would it be possible to show the same using CSP LB (AWS/AZure) to work with NGINX Ingress Controller in Kubernetes for any K8s running as Services (EKS/AKS) or K8s running on EC2 or nodes on CSP. Thanks in advance.
Hi thanks a lot. I am not entirely sure as I have not yet tested it in such an environment. One thing to keep in mind though is that with this configuration mode MetalLB is working in Layer 2 mode and is doing a lot of stuff with ARP, so if your environment does not support ARP that might be an issue. MetalLB does also have a Layer 3 Mode where it uses BGP which you might want to check out as well.
Hi Morris, I just wanted to say my sincere thank you for your outstanding tutorial -- it's saved me a lot of time and helped me better understand cluster networking. I appreciate your calm and evenly-paced dictation and I'll certainly stay tuned for more. I've now deployed metallb on my home cluster and honestly I'm just happy to stop port-forwarding every little service!
Hi, thanks for watching. The end user does not need to be on the same subnet as long a they have a route to that subnet. The default gateway on that subnet will receive the ARP messages and will be aware of all metallb assigned addresses.
What happens if the node that was running the ingress controller pod goes down? You would need to change the host ip mapping to thew ip of the new node that runs the controller right? There should be a better way?
Hi, the MetalLB load balancer ips are not statically configured on any node, but are instead advertised out from an appropriate node. So in the event a node goes down the ip will simply be advertised through another node maintaining connectivity to your service. This is done automatically by MetalLB no need for manual intervention.
Thank you for watching. Sorry about not including the instructions to the video before. I have added a link in the description to the GitHub project with all the manifests and setup instructions.