[ Kube 33 ] Set up MetalLB Load Balancing for Bare Metal Kubernetes

  Рет қаралды 42,193

Just me and Opensource

Just me and Opensource

Күн бұрын

Пікірлер: 377
@linuxkartik6115
@linuxkartik6115 4 жыл бұрын
Not only this Video, your entire channel is very nice info ocean. I really appreciate your doing is generously, while hell number of training institute out there, those are looting to learners . thanks for helping others.. God Bless you!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for these words. You made my day. Cheers.
@crumdev5834
@crumdev5834 4 жыл бұрын
This was really irritating me trying to figure out how to do this without using something like GKE and their dynamic load balancers. Thanks for the helpful and concise video.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Cheers.
@Paeblits
@Paeblits 3 жыл бұрын
I'm new to K8s and have been struggling with this for a few weeks now on my personal projects (kubeadm on a raspberry pi cluster). This finally did the trick. Next step is Ingress controller I think. Thank you!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Pablo, thanks for watching. Cheers.
@maartenvanveen2174
@maartenvanveen2174 4 жыл бұрын
As always your videos are concise to the point and very clear. Thanks a bunch from the Netherlands!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Maarten, thanks for watching. Cheers.
@TheKreweta
@TheKreweta 3 жыл бұрын
One of the best tutorials I've seen in long time (not just this one, your channel is is awesome) :) thanks for help with Kubernetes :)
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Ondrej, many thanks for your comment. Cheers.
@ronaldocorrea8007
@ronaldocorrea8007 2 жыл бұрын
Thank you so much. this video saves my on-prem cluster project.
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Ronaldo, thanks for watching. Cheers.
@786saga
@786saga 4 жыл бұрын
Very good explanation Venkat in first time only I am able to deploy the metalLB in my Kubernetes cluster
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Sagar, thanks for watching. Keep learning :)
@yaghiyahbrenner8902
@yaghiyahbrenner8902 3 жыл бұрын
Man, I just wanted to say thank you for all the videos some helped me alot.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
You are welcome and thanks for your interest in this channel.
@arunabraham100
@arunabraham100 3 жыл бұрын
Thanks for the amazing videos. This is helping me in setting up kubernetes cluster in on-premise infrastructure.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Glad it is helpful. Thanks for watching. Cheers.
@phillewisit
@phillewisit 5 жыл бұрын
Thanks for the videos, I am enjoying the series. I have used MetalLB before (after discovering it prior to watching your videos) so have it working fine. I am just trying to work out however if it is possible to assign a static IP to a service, rather than the next available IP in the range being used. This is obviously important if trying using a NAT or DNS.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Phil, Thanks for watching this video. I think its possible to specify the ip address you want for the load balancer (as per the documentation), although I haven't tried it. From kubernetes.io/docs/concepts/services-networking/service/#loadbalancer, Some cloud providers allow you to specify the loadBalancerIP. In those cases, the load-balancer is created with the user-specified loadBalancerIP. If the loadBalancerIP field is not specified, the loadBalancer is set up with an ephemeral IP address. If you specify a loadBalancerIP but your cloud provider does not support the feature, the loadbalancerIP field that you set is ignored. From metallb.universe.tf/usage/#requesting-specific-ips, MetalLB respects the spec.loadBalancerIP parameter, so if you want your service to be set up with a specific address, you can request it by setting that parameter. If MetalLB does not own the requested address, or if the address is already in use by another service, assignment will fail and MetalLB will log a warning event visible in kubectl describe service Thanks.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Phil, I have done a quick testing and its working as epxected. Please check my output in the below pastebin link. pastebin.com/raw/E6jCbjhJ Thanks.
Жыл бұрын
thanks for sharing. i wish i knew this channel sooner !
@justmeandopensource
@justmeandopensource Жыл бұрын
Hi Juraj, thanks for watching.
@praveenkumar-uc3tu
@praveenkumar-uc3tu 5 жыл бұрын
Superb. This is what I expected. Pls post some videos related to CICD in kubernetes with jenkins
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Praveen, Thanks for watching this video. I have already done a video on Running Jenkins in Kubernetes. Search for it and you will find it. See if that helps or if you need any specific topic/concept. Thanks, Venkat
@praveenkumar-uc3tu
@praveenkumar-uc3tu 5 жыл бұрын
@@justmeandopensource yes I need CI/CD in kubernetes using Jenkins.
@hammadsherwani2938
@hammadsherwani2938 3 жыл бұрын
Love this video, to the point and with good example.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Hammad, thanks for watching. Cheers.
@ranjeetbadhe3817
@ranjeetbadhe3817 Жыл бұрын
Please post a video on federated clusters. Interested in know the configuration and theory part of it.
@pernankilvivek8774
@pernankilvivek8774 3 жыл бұрын
You are doing god's work venkat. Keep up the good work. cheers..!!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Pernankil, many thanks for watching and commenting. Much appreciated.
@WojciechMarusiak
@WojciechMarusiak 3 жыл бұрын
As usuall super easy to follow and well explained. Thanks!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching. Cheers.
@Lebalele21
@Lebalele21 5 жыл бұрын
Keep making video. Always wait for your update.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks Muhammad for watching this videos. There are lot more scheduled for the coming weeks on Mondays.
@florimmaxhuni4718
@florimmaxhuni4718 4 жыл бұрын
Looks like MetalLB did change installation procedure. Is it possible to do another one because the old procedure in documentation I think does not exist. Thanks
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Florim, thanks for pointing that out. I wasn't able to keep track of all my previous videos and I rely on people like you to point out the deviation. I will definitely do a followup one soon. Cheers.
@barsvelioglu2276
@barsvelioglu2276 3 жыл бұрын
Great tutorial. Thank you
@justmeandopensource
@justmeandopensource 3 жыл бұрын
You are welcome. Thanks for watching.
@florianflowfabworx4460
@florianflowfabworx4460 3 жыл бұрын
Is it already addressed, what to do if you have set up your cluster on VPS (virtual private servers) - eg 3 nodes, 1 master 2 worker nodes? In this case, you usually do not have a "Range of IPs" for making the config ... ... I have seen somewhere the suggestion to just enter the IPs of the (in this case 3) nodes then ... Does it work this way? Or, is metalLB the wrong tool then? (I have read somewhere, that on the Level-2 setup metalLB is not really loadbalancing it anyways - it is offering an opportunity to expose the cluster AND offers the check if the node is available to avoid sending requests to the pods on nodes that are actually down (sound a bit strange for me, because this should be the job of the kubernetes anyways...) thanx for your great work, btw - your videos are always a nice source! One suggested improvement: perhaps, you could add some or more comments within the examples of your github. You could even add comments with links to the videos including the time parameter for jumping to the videos outgoing from your github (might be rewarding ... )
@GraysonAdams
@GraysonAdams 3 жыл бұрын
In your video you say it must be in the same network as your nodes. What if I have a node in a different network and want to provision IP's from that network? 2 of my nodes are in one VLAN, and the final node is in my LAN network. I have MetalLB speakers running on all three nodes. Despite opening up the firewall, it appears that MetalLB speakers are only working for IP's in the VLAN pool. If I try to auto-provision an IP from the LAN pool, it never resolves. Any ideas? It appears MetalLB allowed for multiple IP pools? EDIT: Solved by deploying a Controller node on that LAN network as well.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Grayson, thanks for watching and sharing your solution here. I haven't tried running worker nodes on different networks to be able to try this. But this information is super helpful. Cheers.
@tiagosantos2136
@tiagosantos2136 4 жыл бұрын
Question , you need to pass a range of IPs to MetalLB. But when I create a machine on AWS EC2 it comes with only 1 single IP, how to make this single public IP be the IP that MetalLB will provide?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Tiago, thanks for watching. MetalLB load balancing solution is for bare metal environment. In cloud environment, I haven't tried it and used the cloud ALBs.
@smiimohamedayoub4023
@smiimohamedayoub4023 3 жыл бұрын
Thanx for this interesting tutorial i have a question , can i use metallb for egress traffic ?? if not is there any solution that provide that on bare-metal infrastructure ?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thanks for watching. Metallb is a load balancing concept. Why would you need load balancing for egress traffic? I am not sure about your requirement to be honest.
@smiimohamedayoub4023
@smiimohamedayoub4023 3 жыл бұрын
@@justmeandopensource Thanks for the reply , in my production environnement i would like to assignea public ip to each pod for the outgoing traffic , and i need to do it on the firewall with the pod ip adresses , So with calico i peered my cluster into my network over BGP (to make the pods publicly routable) and i used fixed IPs for the pods that need to send traffic out . and it work now for me :))
@SantoshPatil-ld4yg
@SantoshPatil-ld4yg 2 жыл бұрын
Hi I am new to kubenetes, I have created LB as peryour instruction. Now I am trying.to route my pos web page to other machines in my lan network . I am using VMware with 3 nodes cluster.
@seshreddy8616
@seshreddy8616 4 жыл бұрын
Thanks Venkat. I've struggled to find this content elsewhere and you're truly amazing. I indeed read a few best books and they've mentioned only minikube or cloud.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Sesh, thanks for watching.
@MrDjegsi
@MrDjegsi 3 жыл бұрын
Hi Just , nice video , l have implemented LB , and working good, but why this IP are not pingable ?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Lulzim, Thanks for watching. Those IPs won't be pingable which is kind of expected and it is by design.
@swethakristipati7303
@swethakristipati7303 Жыл бұрын
Thanks venkat for the great explanation... actually i have installed metallb and service exposed got the external IP..i am bale to access the external ip only with the curl ...when i am trying to access in the browser unable to access this service...can you please help here ?
@zhang20244
@zhang20244 4 жыл бұрын
SO good ! , It works ! I just need it for my work test, Thank you
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Frank, thanks for watching. Cheers.
@zhang20244
@zhang20244 4 жыл бұрын
Just me and Opensource I hope you have video for install ML platform such as domino lab , airflow, Kubeflow., APIGEE., Tesonflow , these are opensource run on top of kubernetes . Thank you so much
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@zhang20244 I haven't explored the ML world yet. Let me see if I have time to do that. Cheers.
@zhang20244
@zhang20244 4 жыл бұрын
Just me and Opensource thank you , also the dvc (data version control) is very important for ML
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@zhang20244 Yeah.
@devops-boot-camp
@devops-boot-camp 3 жыл бұрын
Man you are awesome
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Prashant, thanks for watching. Cheers.
@HerryTCO
@HerryTCO 9 ай бұрын
What is the advantage of using MetalLB to just creating a resource of type Service? As I understood the latter gives it an IP from the network plugin (in my case Flannel) and does the same without the complex setup? What am I missing? Thanks in advance :)
@thunderbirds8633
@thunderbirds8633 3 жыл бұрын
On the metallb site, there is this line added after yaml file to install metallb, if we skip this then metallb pods are failing to start. Can you explain why this is for # On first install only kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)" So I deleted the namespace completely and created again with all steps.I have followed the steps of installation from metallb website. And the metallb containers are also running. After that I deployed an nginx service for testing with service as LoadBalancer. The LoadBalancer is not getting IP from metallb. Any suggestions on how to fix this?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, I did an updated video on this topic. Its the next video in this playlist. kzbin.info/www/bejne/aITQip2gYqx5pKc See if that helps.
@jean-baptistelasselle4562
@jean-baptistelasselle4562 4 жыл бұрын
Hi, A question here about the IP address being available "from outside the cluster" : => Here what I do not understand in your explanation on the IP range dgiven to metallb, is that you pick the INTERNAL IP of the cluster nodes => I mean let's say I have one machine on local network, with just one NIC 192.168.1.23 : On that machine I run the entire K8S cluster( VMs or containers), and then suddenly because there is metallb I can hit 10.209.211.* from 192.168.1.23 ? I do not understand that ...
@stdio9965
@stdio9965 2 жыл бұрын
did you understand?
@devmrtcbk
@devmrtcbk 3 жыл бұрын
Thanks again Venkat. I have a few questions on my mind, as you know, in data centers, IP addresses are usually distributed statically by system experts. The IP address we created here is VIP. Is this ip address actually managed by DNS within the Kubernetes cluster? How do we forward a domain to this ip address with external dns? Also, let's say we have 3 worker nodes, do we enter 3 records in external dns (like round roubin)? Because we want to use the IP addresses produced by metallb outside, but we do not manage the external IP addresses.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Murat, thanks for watching. Ideally you would reserve a block of ip addresses in a network and use that in metallb configuration. MetalLB doesn't check whether that IP has been already assigned to some other resource externally. So we should make sure to reserve a range manually and let metallb use it.These are not managed by kubernetes internal DNS but by the metallb pod. You can just add a dns entry with the ip provided by the metallb for your service in your dns server.
@devmrtcbk
@devmrtcbk 3 жыл бұрын
@@justmeandopensource thank you Venkat, ok understood. so if we already have external load balancer what is your recommendation? i mean metallb is not a kind of best practice, right? should i use nordport if i have external load balancer or can i use external load balancer to forward to ip assigned by matallb? what is your recommendation?
@sparkman786
@sparkman786 5 жыл бұрын
Hi - One recommendation I have for services is to create a yaml for them and store in your github repo. When you use the command line, it is hard to remember where in the video you did this. thanks!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi, many thanks for watching this video. Thats a good suggestion. I will make sure to have a manifest instead of command line for creating resources here after. Valid point. Thanks, Venkat
@nyanRETARD
@nyanRETARD 4 жыл бұрын
Hi, great video and I understood everything except. Why do you define IP range 10.209.211.220 - 10.209.211.250 ? Your nodes are 10.209.211.287 and 10.209.211.106. Numbers 287 and 106 are not in range 220-250. I run only master node(I guess another node should be different server) on a bare metal server(upCloud) and following the tutorial I got everything working except the external IP of LoadBalancer points to some random web site(market place). Thanks for the answer in advance
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Yes, thats the point. The ip range you specify should be on the same network as your worker nodes. So it should be in 10.209.211.0/24 network. But you should define a range of unused IP addresses.
@CloudNativeJanitor
@CloudNativeJanitor 4 жыл бұрын
@@justmeandopensource but how can you make sure you will not have IPAM issues later, that is you are using out randomly ip addresses, is there a better way to allocate these ips without causing issues later on?
@IgnoreMyChan
@IgnoreMyChan 4 жыл бұрын
@@CloudNativeJanitor You should reserve that range for the load balancer.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Indeed you should reserve a range for load balancer.
@JiangshuiYu
@JiangshuiYu 2 жыл бұрын
@@justmeandopensource Hi, awesome video. I got a question here, the node IP seems to be internal network IP addresses? Starts with 10. How can I get a public external IP that I can change my DNS point with and everyone else can access it by using my domain? Thanks.
@Vamshk
@Vamshk 3 жыл бұрын
Great explanation, What Is the $PS1 you got? Can you pls share Many thanks Vamshi
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thanks for watching. I did this video on my terminal setup which could be helpful. kzbin.info/www/bejne/hoa6n3aYp56WhJo
@shubhamshastri7409
@shubhamshastri7409 Жыл бұрын
by any chance can you please tell me which terminal is this ?
@kairav-KRS
@kairav-KRS 2 жыл бұрын
hii sir, How to do this in Kubernetes cluster running on ec2 instance on aws cloud (aws ec2 only use as a platform). I did same thing but in my case Loadbalancer external ip not accessible from outside
@bobbykhan3451
@bobbykhan3451 4 жыл бұрын
You have explained it so well but I have tried to assigned a static ip address and through the range pool range but service couldn't get an ip address. My environment is on fusion.
@bobbykhan3451
@bobbykhan3451 4 жыл бұрын
Thanks!!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Bobby, thanks for watching. What's the IP range you specified? Try choosing a different range in the same network as your worker nodes. May be try picking the last few ones.
@bobbykhan3451
@bobbykhan3451 4 жыл бұрын
I am not getting any ip address follow your instruction on Fusion's VMs
@bobbykhan3451
@bobbykhan3451 4 жыл бұрын
@@justmeandopensource I am not getting external ip address, it's showing as pending state. My DHCP range on Fushion is 128-254 address. I even try to assign static ip adsress as you have mentioned in one of your threat.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@bobbykhan3451 Hmm. What version of Fusion are your running? And whats your host machine OS?
@vamseenath1
@vamseenath1 3 жыл бұрын
Hi Venkat, Need your advice, please! I have Build K8 Cluster with 3 Masters + 5 Worker nodes. Due to security reasons, no public IP's assigned. Internally within the network the Application exposed is accessible with private-ip:nodeport, but from the outside world it is not accessible. -Now to access the App :nodeport to be mapped with public ip? -To expose with type:LoadBalancer should i configure MetalLB with public ip range? Any best solution please?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Vamsi, thanks for watching. MetallB is for bare metal infrastructure. It won't work well in cloud environment as you don't have control over ip addresses. I believe you are using kubernetes in a cloud environment. You can keep your nodes in a private subnet/network and still use LoadBalancer type service to expose it to outside world. Only your load balancer needs access to the private network where your nodes are running. Cheers.
@vamseenath1
@vamseenath1 3 жыл бұрын
@@justmeandopensource Hi Venkat, My K8 infra is also on the baremetal server VMware infra(on top of ibm cloud). Where the ip definition is managed by our network team. My idea is to reserve a range of public ip's and use it in the metalLB, where the reserved ip range should have access to k8 private network.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
@@vamseenath1 In order for metallb to work you will have to choose the ip addresses in the same range as your kubernetes nodes. Your private and public network will be different. So I guess it wouldn't work. You could instead have a HAProxy load balancer installed on a server in a public network and use nginx ingress internall within the cluster.
@vamseenath1
@vamseenath1 3 жыл бұрын
@@justmeandopensource thanks Venkat for your advice 👍🏼🙏🏼
@justmeandopensource
@justmeandopensource 3 жыл бұрын
No worries.
@prashantparihar5117
@prashantparihar5117 4 жыл бұрын
Hi tried all the steps that have been shown in your video. I got the external ip address for my LB-Svc. but when I browse it says"connection timed out". I have installed kubernetes cluster on AWS EC2 instances and have carried out bare-metal installation but it did't work out for me - it says ""connection timed out". Can you help what could be reason. Are you planning to create another video on the same topic as many of us are still facing the issues. Appreciate your help and thank you!!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Prashant, thanks for watching. MetalLB is a load balancing solution for on-prem infrastructure. If you are alread in the cloud, you can make use of cloud load balancer. I haven't actually tried using MetalLB in AWS. It may not work at all.
@fz-ssaravanan2036
@fz-ssaravanan2036 5 жыл бұрын
Hi bro... I have a doubt ... I have 2 bare matel server in hetzner I have configured k8s using flannal network.. want to configure ingress Loadbalancer using metalb... Here will I go to configure IP ranges In my master node and give gateway subnet mask ?? if I use hetzner will I go to buy IP in hetzner...kindly help me bro
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Saravanan, thanks for watching this video. MetalLB solution is best suited for bare metals and if you have control over networking. I haven't used Hetzner before and not sure how networking works. If its a cloud provider, they should have load balancing built in. If you are using the cluster for learning and development purpose, you can just use one machine and set up a local cluster using LXC or Docker containers. kzbin.info/www/bejne/aqGXdaSaiamkoc0 (Using docker containers) kzbin.info/www/bejne/joLZgoh7bNl0qc0 (Using LXC containers) Thanks.
@fz-ssaravanan2036
@fz-ssaravanan2036 5 жыл бұрын
@@justmeandopensource thanks for your reply bro.. I have done my job using metalb... Your video is very awesome to learn easily 👍 good job bro 💪
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@fz-ssaravanan2036 You are welcome. Cheers.
@jktrivedi29
@jktrivedi29 4 жыл бұрын
consice and perfect. Thanks
@justmeandopensource
@justmeandopensource 4 жыл бұрын
HI Jagrut, thanks for watching. Cheers.
@bayaas0025
@bayaas0025 4 жыл бұрын
I have used metal lb my external IP was under pending. Metallb controller and speaker pods are running fine. Configmap also applied
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. What is your environment like? how did you provision the kubernetes cluster? What hypervisor are you using? Did you check the logs of all the metal lb pods after creating the load balancer service?
@elhamahmadlou5185
@elhamahmadlou5185 5 жыл бұрын
i did exactly what you had done , but the EXTERNAL-IP is still pending ,
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Elham, whats the network range of your worker nodes and what range you have defined in the metallb config? It has to be in the same subnet. Thanks.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@livestupid thinkbrilliant Hi, so are you worker nodes in two different network ranges?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Can you just try it with one network range like below? 192.168.11.240-192.168.11.250
@volivattam
@volivattam 5 жыл бұрын
Thanks for your video. We want to use metallb for our on premises k8s cluster. We have around 50 services. Instead of creating 50 lb's is there a better way to use path base routing to route to desired services.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Sridhar, have you checked my previous videos on Traefik and Nginx ingress controllers? If not, please have a look at it. It might give some directions for you. Once you get a basic understanding of ingress concept, you can check the below link (Simple Fanout) for your needs. kubernetes.io/docs/concepts/services-networking/ingress/ Thanks, Venkat
@OnBetamax
@OnBetamax 5 жыл бұрын
Maybe someone could answer a question. I've deployed it on Contabo. The public IP can be accessed from each host (1 master + 2 workers) but not from my computer. So, how could I redirect http connections from my host (231.X.X.X) to that LB IP?¿ It doesn't do it by default . Thanks!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi, Thanks for watching this video. I am not sure how networking is managed and hosts are exposed to public in Contabo. This metallb solution is specifically suited for bare metal on-prem environment and not for Cloud environment. Each cloud provider have their own load balancing solution. Is your service getting external IP address assigned from metallb configuration? If its assigning and you can't reach it, you better raise a support case with Contabo provider. Thanks
@rahuldeewana1302
@rahuldeewana1302 3 жыл бұрын
Awesome explanation 💯. Can you please help me to know that, can a local kubernetes cluster can be exposed to the interne? By using the method you have shown can we use this external ip in any device or only in the machine running this kubernetes cluster, Thanks.
@SachithNalakaMuhandiram
@SachithNalakaMuhandiram 4 жыл бұрын
Thanks for the detailed guide. I have followed the steps and installed Metallb and nginx. External IP also assigned. But I can not access to it from the network. Even with hosting PC.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Sachith, thanks for watching. I believe your infrastructure is somewhere on a hosting cloud. It might be due to firewall or some networking issue. MetalLB is more for on-prem situation. Cheers.
@foxipub3629
@foxipub3629 4 жыл бұрын
@@justmeandopensource Hi Vikant, same problem here and i use on-prem configuration (firewall and SElinux turned off) and i cant reach external IP not from host machine nor from cluster members ... please can you take a look closer ... thank you.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@foxipub3629 Thanks for watching. Could you please explain a little more about your infrastructure? Are these virtualbox vms or physical machines? What is your network range for the kubernetes nodes and what range you specified in your metallab config?
@foxipub3629
@foxipub3629 4 жыл бұрын
@@justmeandopensource Hi Vikant.I am using Hyper-V as hypervisor platform.At first i changed type of virtual switch from default to external, in second last time i ignored some instructions from metallb site (this: apiVersion: kubeproxy.config.k8s.io/v1alpha1 kind: KubeProxyConfiguration mode: "ipvs" ipvs: strictARP: true) and now i apply it then i repeat all your steps and it works now! Thank you!
@mtcheryan
@mtcheryan 4 жыл бұрын
Excellent tutorial!!
@aymenghazali5113
@aymenghazali5113 3 жыл бұрын
Thank you
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Aymen, thanks for watching.
@sparkman786
@sparkman786 5 жыл бұрын
Hello - great videos! I do have question onMetalLB vs HAProxy you showed in an earlier video. Can you help me understand the difference between these solutions? Should I also be installing Ingress controllers with MetalLB? Would you combine HAProxy and MetalLB together with Ingress Controllers? If so, perhaps you can add that to your list for videos. thanks much!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi, I did these videos around ingress, metallb and haproxy as I learned them. Didn't had a chance to see the bigger picture as where these fit and usecase scenarios. I will understand these better before commenting. Thanks, Venkat
@zend112
@zend112 4 жыл бұрын
Like always, it depends. Do you want your service to talk to other services directly on the network? If you have 100 microservices running, I don't think this will scale well, so no. Usually you have a webapp composed of multiple small services that expose an API. Here is the case for the Ingress and Ingress Controller. You expose the API gateway as a LoadBalancer and you use redirect from there using Ingress rules to your APIs. I am still learning these concepts myself and maybe the explanation is not the best but it's a start.
@satishtxt
@satishtxt 4 жыл бұрын
My big question is why did you use metalLB for this task? There are other alternative available.
@abbaaabccabbaaabcc2350
@abbaaabccabbaaabcc2350 5 жыл бұрын
Fast one. How is this "autocomplete" option/app/solution name who allow you to in background see kubernetes/bash commands? This autosuggestion is coming from bash history? Thank you.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi, I have done a video on my terminal setup as many viewers asked for it. You can check it out in the below video link. kzbin.info/www/bejne/qaCkqIinZ8iEfrM Thanks, Venkat
@Amine-gp8im
@Amine-gp8im 3 жыл бұрын
Thank you for the video. I have a question. what if my internal-IP for the nodes are not in the same network for example one node have 150.0.0.5 and the other one is 70.6.4.8
@vasudevreddy3548
@vasudevreddy3548 4 жыл бұрын
Hi, i am running gcp vm cluster (not gke). Everything looks good. But load balancer ip is not accessible from outside. How to proceed. Thank you.
@nathanbrown2459
@nathanbrown2459 4 жыл бұрын
How do you expose or access the cluster from an external source? I have ingress-nginx and metallb set up and a web svc exposed on port 80. When I get services it shows an external ip that is the same for the web svc and the ingress. The ingress is of type load balancer and the web svc is currently set to type nodeport.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Nathan, Thanks for watching. MetalLB is a load balancing solution for your internal kubernetes cluster needs. I think you are mixing ingress and metallb. Or I may be wrong in the understanding. I assume you are running your cluster on bare metals and not on any cloud. So here is the way ingress works. You create you app deployment, expose it as a service of type ClusterIP (not NodePort). Then you create an ingress resource, stating which backend clusterip service the traffic should be sent to when a request comes for a specific domain. Ingress controller is a pod that runs on each of your nodes and are bound to host ports 80 and 443. You will have to configure an external load balancer like haproxy (not metallb) to load balance the requests to multiple worker nodes. When you hit the load balancer for a specific domain (eg: myapp.example.com), it will forward to one of the load balancer and the ingress controller pod on that node will route the request to the backend cluster ip service. Thanks.
@nathanbrown2459
@nathanbrown2459 4 жыл бұрын
@@justmeandopensource I was able to set it up using metallb and istio ingress gateway which was able to use the external IP from metallb. I created an Istio Ingress Gateway and a virtual service.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@nathanbrown2459 That's great. In fact I was gonna try something similar later this week and will make it a video. Thanks.
@pawekrol999
@pawekrol999 4 жыл бұрын
Hello i try to implement metallb based on yor your video and it's not working. I have 2 two master nodes (load ballancer from vcloud for ha of master "control-plane-endpoint" with taint masters servers ) cluster with two workers on Server Version: v1.18.3 and i got still pending on expose service as loadballancer. What can be wrong ?
@pawekrol999
@pawekrol999 4 жыл бұрын
There is an error in controler's pod "E0608 21:53:24.719047 1 reflector.go:125] pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/cache/reflector.go:98: Failed to list *v1.ConfigMap: Get 10.96.0.1:443/api/v1/namespaces/metallb-system/configmaps?fieldSelector=metadata.name%3Dconfig&limit=500&resourceVersion=0: dial tcp 10.96.0.1:443: i/o timeout "
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@pawekrol999 Hi thanks for watching. Where are these servers running? Whats the network range of your kubernetes nodes and what have you configured for network range in metallb config?
@sirawichvoungchuy3128
@sirawichvoungchuy3128 4 жыл бұрын
Hi i don't know why i do follow your solutions and finally i got the external-ip but when i try to open it on the browser it doesn't work i do it on my macos
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Sirawich, thanks for watching. I haven't tried it on a MacOS so can't comment.
@jklibra2
@jklibra2 5 жыл бұрын
Hi Venkat, Thanks for excellent video. It always help watching online demo than reading documents. I have followed your steps, however facing one issue as below. I have Kubernetes cluster with three master and five worker nodes. If I give address range from Master 1 to Worker 5 (Total 8 IPs) in MetalLB config ; it works as desired. However If I give address range outside Kubernetes cluster but same address range; it creates Load Balancer IP but from Browser it is not accessible. Any thought on this. Regards, Jayesh
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Jayesh, thanks for watching this video. I have heard similar issue from few others as well. Not exactly sure what is causing this. Also the choice of overlay network in your cluster might also cause this. I am using Flannel as the overlay network. How is your cluster provisioned? Where is each node running? Is it your development environment in your local workstation or is it running on multiple physical servers? Or in cloud? Thanks.
@jklibra2
@jklibra2 5 жыл бұрын
Hi Venkat, we are also using Flannel as overlay network. My cluster is a Development environment where VMs have been provisioned on Azure Cloud and but we are not using Azure Kubernetes Service. We have manually installed Kubernetes on the VMs and made cluster ready.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@jklibra2 Hmm. Thanks for the details. MetalLB is for bare metals. I am yet to try this on a cloud environment. Hoped it would work without any tweaks. But will try this in AWS cloud instead and see if I can reproduce. Thanks.
@sarathy6
@sarathy6 4 жыл бұрын
One of my speaker pod is in evict state after the installation. I tried the installation via helm and also the Manifest method. I could not get much of the troubleshooting steps in google. What could be the cause of this issue?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Sarathy, thanks for watching. Hard to diagnose without looking at the logs. It could be for any number of reasons and needs deeper look unfortunately.
@assaduzzaman_dsi
@assaduzzaman_dsi 4 жыл бұрын
Dear Sir, Your tutorial is very nice and it is perfectly working. However I have a situation. I need to know the client REAL-IP address to do some IP based rule on a pod. But unfortunately I'm getting always cni gateway IP on my pod which is 10.244.x.1(10.244.0.1, 10.244.1.1, 10.244.2.1 etc). I'm using baremetal and metallb as load balancer with centos7 and cni plugin is flannel. I have cluster with one master and two node. Please help. I don't have any choice to use any public cloud like aws or gcp or azure.
@weitanglau162
@weitanglau162 3 жыл бұрын
If I am planning to use Nginx Ingress Controller for my Bare Metal Kubernetes Cluster, I will still need to setup MetalLB for the controller to "acts" as a load balancer right?
@cokegen
@cokegen 4 жыл бұрын
Thanks ! great explanation ...
@justmeandopensource
@justmeandopensource 4 жыл бұрын
HI Cokegen, thanks for watching.
@babviny
@babviny 4 жыл бұрын
Hi Venkat - Thanks for sharing great video tutorial on MetalLB. I followed the steps mentioned in this video and stuck. Unable to access the external/exposed IP arp -an shows ubuntu@k8s-pi-master:~$ arp -an ? (192.168.15.1) at 04:95:e6:ad:69:40 [ether] on wlan0 ? (192.168.15.127) at f4:96:34:a2:17:a0 [ether] on wlan0 ? (192.168.15.18) at dc:a6:32:b0:a5:5d [ether] on wlan0 ? (10.1.81.7) at 9a:d7:b7:28:2e:e3 [ether] on cni0 ? (10.1.81.8) at 66:13:ce:58:55:2e [ether] on cni0 ? (192.168.15.17) at dc:a6:32:b0:a5:cc [ether] on wlan0 ? (10.1.81.5) at 8a:af:bd:7c:21:4b [ether] on cni0 ? (192.168.15.210) at on wlan0 ? (10.1.61.0) at 9a:a0:49:55:41:24 [ether] PERM on flannel.1 ? (192.168.15.109) at e0:ca:94:a9:ce:6c [ether] on wlan0 ? (10.1.58.0) at 42:ba:9e:2a:87:f5 [ether] PERM on flannel.1 ? (10.1.81.6) at b6:8f:04:64:a6:9c [ether] on cni0 ubuntu@k8s-pi-master:~$
@janjezek9333
@janjezek9333 5 жыл бұрын
Hi @Just me and Opensource. I like very much how clearly you explain complex things. But I have still a problem: I exactly followed your tutorial (except the IP range you provide / I customized it to be in my used IP range), but the LB keeps in state... I am on a Hetzner Cloud (because it's unbeatable cheap). Can you please help me to get my Loadbalancer running? I sit there now for two weeks on this issue and getting despair. Thank you in advance
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Jan, Thanks for watching this video. After you created the MetalLB resources, you create the configmap with ip address range details. This ip range should be in the same network as your worker nodes, otherwise it won't work. In my set up I have used Flannel as the pod overlay network. There are others like Calico, WeaveNet which I haven't tried. What overlay network you are using and how you had set up your cluster? Thanks, Venkat
@janjezek9333
@janjezek9333 5 жыл бұрын
@@justmeandopensource thank you for your response. I used the IPs from my workers. Then I tried IP ranges next to it. I also had in my mind, that my cloud provider does something "invisible" with the network routing. So I wrote them today and wait for their response. I use Calico right now. I setup the whole cluster through Rancher which is an awesome GUI for K8s. To be honest I am a software developer and not a devop-guy, so my knowledge of networks, routing and that stuff is extremely limited. This is also a reason why I use rancher. Right now I registered an account at Scaleway to try there my luck, they have nearly exact same prices on machines like Hetzner (where I have these issues). Are your demo on a real world cluster or on minikube? I will create now a cluster with Flannel on Hetzner. I also thought that I maybe have to make some tweaks in the kubeconfig to get my setup running.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
The first overlay network I tried was flannel which worked and ever since my cluster setup is using flannel. For all the demos, I use my Laptop running Linux. I use one of the below setups for my cluster and recently only using the second option with LXC containers. Using Vagrant Virtual Box for nodes kzbin.info/www/bejne/rYHHenWbjK99qck Using LXC containers for nodes kzbin.info/www/bejne/joLZgoh7bNl0qc0 Thanks
@janjezek9333
@janjezek9333 5 жыл бұрын
@@justmeandopensource Hi @Just me and Opensource again. I spun up a new cluster with Flannel. (I didn't work out of the box. I had to add a yml file (raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml). I have now an "External IP" for the first time. (YAY!) But when I call my IP it's bringing me only to the "default backend 404" kubectl get all NAME READY STATUS RESTARTS AGE pod/nginx-57867cc648-tq6sq 1/1 Running 0 13m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 10.43.0.1 443/TCP 35m service/nginx LoadBalancer 10.43.201.213 159.69.121.90 80:31432/TCP 13m NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/nginx 1/1 1 1 13m NAME DESIRED CURRENT READY AGE replicaset.apps/nginx-57867cc648 1 1 1 13m Do I have to add an ingress too? How can I resolve to a DNS?
@janjezek9333
@janjezek9333 5 жыл бұрын
By the way, I also had to use my Server IPs. kubectl get nodes -owide  ✔ NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME system1 Ready controlplane,etcd,worker 37m v1.13.4 159.69.121.90 Ubuntu 16.04.5 LTS 4.4.0-142-generic docker://18.9.4 apiVersion: v1 kind: ConfigMap metadata: namespace: metallb-system name: config data: config: | address-pools: - name: default protocol: layer2 addresses: - 159.69.121.90/32
@toroktechnology7420
@toroktechnology7420 4 жыл бұрын
How can I set Ip range address if I have different IPs for different vps
@faridakbarov4532
@faridakbarov4532 4 жыл бұрын
Hi Vinkat,i have istalled Metallb and try to expose nginx and everything is ok and working, i can to open with external ip. But how i can do it with installed deployment for example kubernetes dashboard? i can connect to dashboard from localhost:8001, but how i can expose it to loadbalancer. Thanks in advance
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Farid, thanks for watching. You should be able to expose the dashboard service as a load balancer type service. Have you tried it? Have you tried using NodePort service?
@dhananjaypatangay4029
@dhananjaypatangay4029 4 жыл бұрын
Hi Venkat, How can I access the load balancer IP which is in a vagrant VM from the host?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi DP, In my case, the host machine is a Linux machine and I have a Vagrant provisioned virtualbox VMs as kubernetes nodes. The virtualbox VMs are connected to a bridge, virbr0 and the load balancer IP is from this bridge. My host machine can access this bridge so it can connect to the Load Balancer IP. How is your environment setup? What is your host machine? and How are you running your k8s cluster?
@dhananjaypatangay4029
@dhananjaypatangay4029 4 жыл бұрын
@@justmeandopensource Hi Venkat, I am using Private Network with Private IP's and HostOnly network. My Host is a Mac and Guests are two Vbox machines configured with Vagrant. Using bridge mode can I have private ip's?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@dhananjaypatangay4029 Yes. Thats the reason for using host only adapter. You access the private ip of the two VMs from your mac, right. If so, then you should also be able to access the load balancer ip as it will be in the same network range.
@realthought2262
@realthought2262 4 жыл бұрын
Hey i want to ask you one thing that can we do same with our cloud machine.... Will we need to configure cloud controller manager first and do we have to enable external loadbalancer flag also... bit confused ... suggestions please !! thx
@arslan.akhtar
@arslan.akhtar 4 жыл бұрын
I am using docker-desktop community edition for windows10 k8s infrastructure, after following all of your steps, I have managed to get the External-IP for service/nginx type:LoadBalancer, but when I try to browse the IP address, I get nothing and it says "This site can’t be reached". $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 443/TCP 9d nginx LoadBalancer 10.100.202.20 xxx.xxx.xx.x 80:31425/TCP 74m kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME docker-desktop Ready master 9d v1.16.6-beta.0 xxx.xxx.xx.x Docker Desktop 4.19.76-linuxkit docker://19.3.8
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Muhammad, thanks for watching. I haven't tried it in Docker Desktop. May or may not work. But in your case, given the ip address is getting assigned for the load balancer service, I would check if the backend pods are actually running. Did you try that with some other app deployments.
@balajisivaram1476
@balajisivaram1476 5 жыл бұрын
Hi Venkat, I followed this video to expose my app using metallb. Since I already had the cluster ready I just needed the loadblancer so that I can expose my app publically. After watching the video I'm able to set an external IP and when i curl the load balancer ip within the cluster I could see my app however when I access the load balancer ip on a browser it gives me page not found. I have used weave network for overlay. Any advice? I just started exploring kubernetes lately and thanks for the informative videos btw.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Balaji, thanks for watching this video. I have used Flannel as the overlay network on all my setup. I am going to quickly spin up a cluster and use weavenet and test metallb. Will update you shortly. Thanks
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Balaji, I just tried it using Weave Net and it worked perfectly fine. What network range your worker nodes are in and what network range you specified in the metallb config-map configuration? Thanks.
@balajisivaram1476
@balajisivaram1476 5 жыл бұрын
@@justmeandopensource Hi Venkat, thanks for looking. The address range I used for my nodes are 10.2.1.0/24. I have a single worker node and I configured it using kubedam. I used azure to deploy two virtual machines one for master and other for node my master has an ip of 10.2.1.4 and worker 10.2.1.6 so in the configuration file I specified a range between 10.2.1.8-10.2.1.20. please advise I have been using flannel but I remember last time had trouble bootstrapping the cluster using kubeadm using flannel after I tried weave it worked and never been a problem.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
I am not sure how it works in the cloud. But for me it works very well in both flannel and weave net.
@kkbk5690
@kkbk5690 4 жыл бұрын
I created a 3 EC2 instances and installed metallb. As part of Metllab choose L2 and created an elastic IP and assigned that to metallb config. Things did not work. Is there a way to make metallb work with EC2 instances ?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. I don't think it will work in AWS cloud. MetalLB is meant for bare metals. In the metallb config you will have to define the IP address range in the same network as your worker nodes. But in AWS I don't think that can be achieved. I haven't tried that. May I know why do you want to use MetalLB in AWS? Thanks.
@kkbk5690
@kkbk5690 4 жыл бұрын
@@justmeandopensource I am trying to install istio and one of the pre-req was installing metallb.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@kkbk5690 Thats for bare metals I am sure. In AWS you can ignore that bit and a Load Balancer will be automatically provisioned when a service of type LoadBalancer is created.
@kkbk5690
@kkbk5690 4 жыл бұрын
@@justmeandopensource On AWS, i did not use EKS but used EC2 to create vanilla K8S cluster. Something like baremetal. Thanks for the help and answering the questions.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@kkbk5690 I see. I will have to test that. Never used before. Sorry.
@ashwathmendan732
@ashwathmendan732 4 жыл бұрын
Hi, can we create front end nginx proxy server in front of cluster to access the services/domains hosted on cluster?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Ashwath, thanks for watching this video. You can use Nginx ingress controller inside your cluster to expose your apps/services outside of the cluster.
@ashwathmendan732
@ashwathmendan732 4 жыл бұрын
@@justmeandopensource thanks for the update. Can I host nginx ingress controller on a separate machine?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@ashwathmendan732 That will be extra work. Ingress controllers are meant to be deployed within your cluster that takes care of internal routing once you hit the load balancer.
@ashwathmendan732
@ashwathmendan732 4 жыл бұрын
@@justmeandopensource thanks , so haproxy can be used in separate machine as load balancing on separate machine (on-premise) and Deployment of nginx ingress controller on cluster (on all nodes).
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@ashwathmendan732 That's right.
@linuxlinux9459
@linuxlinux9459 4 жыл бұрын
Very good video, tks for sharing \o
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Thanks for watching. Cheers.
@arslan.akhtar
@arslan.akhtar 4 жыл бұрын
How to decide what range of ip addresses pool to assign to metalLB layer-2 configMap.yaml? How can I check what range of ip addresses are available for a linux/win10 machine? The private ip's assigned to your nodes were 10.209.211.35, 10.209.211.107, 10.209.211.106, so does it mean that in metalLB configMap, you can choose your private IP Addresses in any range from 10.209.211.0/24 = 10.209.211.0 - 10.209.211.255? and then metalLB will convert these range of private IP's to public IP's?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Muhammad, thanks for watching. You should use a range of ip address from the same network that is not already used. For example, if nodes ips are 10.209.211.35, 10.209.211.106, 10.209.211.107, i would choose a range like 10.209.211.230-10.209.211.250, setting aside some 20 ip addresses. Cheers.
@arslan.akhtar
@arslan.akhtar 4 жыл бұрын
@@justmeandopensourceThanks a lot. Your channel is very informative. Thanks for your videos.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@arslan.akhtar You are welcome. Cheers.
@ramyallam4747
@ramyallam4747 5 жыл бұрын
Thanks so much!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks for watching this video Ramy.
@taruntilokani1
@taruntilokani1 5 жыл бұрын
Hi @Just me and Opensource I have my setup in Oracle Virtualbox. Below is my setup. 3 VM's running with 4gb RAM 4cpu. Host-only Adaptor Network(192.168.56.0/24). All VM's are able to communicate with each other. I have installed Kubernetes on VM's and able to access the dashboard/services using node port For example : Http://192.168.56.**:32*** (By using Nodeport ) I have followed the video and I have performed the same and now when I am creating the service I'm unable to get the external IP. Below is my config map file. apiVersion: v1 kind: ConfigMap metadata: namespace: metallb-system name: config data: config: | address-pools: - name: default protocol: layer2 addresses: - 192.168.56.201-192.68.56.250 Any help is Appreciated
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi, thanks for watching this video. What overlay network you have setup in the cluster? My cluster setup in this video is based on Flannel network. Although it shouldn't matter, I haven't tried it on any other network. Thanks.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Also, have you checked the events? Kubectl describe svc and check the events section at the bottom of the output. You might have some clue there as to why it's failing. Thanks.
@taruntilokani1
@taruntilokani1 5 жыл бұрын
@@justmeandopensource I have used Calico network
@justmeandopensource
@justmeandopensource 5 жыл бұрын
In all my videos, I prefered to use Flannel for my cluster as it was simple. Calico is feature rich and it's internal working is little complex. I think many people had your problems. github.com/danderson/metallb/issues/117 When I get some time, I will try to reproduce this setup on a cluster with Calico and see if I get the same issue as you get. Thanks.
@taruntilokani1
@taruntilokani1 5 жыл бұрын
@@justmeandopensource I have checked and found no events in it :(. root@kubemaster:/home/devops# kubectl describe service node-js Name: node-js Namespace: default Labels: name=node-js Annotations: Selector: name=node-js Type: LoadBalancer IP: 10.105.217.125 Port: 80/TCP TargetPort: 80/TCP NodePort: 31804/TCP Endpoints: 192.168.86.66:80,192.168.86.67:80,192.168.86.68:80 Session Affinity: None External Traffic Policy: Cluster Events:
@LucasMellosCarlos
@LucasMellosCarlos 5 жыл бұрын
How to make a load balancer request redirect to an app?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Lucas, what do you mean exactly?
@LucasMellosCarlos
@LucasMellosCarlos 5 жыл бұрын
@@justmeandopensource I mean. I've just deployed a Python web app. How can I connect it to my LB?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@LucasMellosCarlos That's exactly what I explained in this video. You expose your application by creating a service and have the type set to LoadBalancer. I believe you didn't watch the video completely. Thanks.
@LucasMellosCarlos
@LucasMellosCarlos 5 жыл бұрын
@@justmeandopensource Thus should I create a service to my Python app and expose it using type set LoadBalancer, not a Nginx Load Balancer?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@LucasMellosCarlos Yes. Thanks.
@pablofernandez9538
@pablofernandez9538 4 жыл бұрын
Thanks for your videos! Here you have a new subscriber! :) Just one quick question (newbie here).. I'm trying MetalLB and ingress-nginx, and I've created two LoadBalancer services, so now I have two services, each one with a different public IP address. Is there a way to associate a specific LB svc to a specific ingress?.. do I need an 'ingress controller' per public IP, maybe? The final idea in my head is something like this: 1.2.3.4 -> Ingress1 -> www.john.com/foo -> foo_clusterip_svc 5.6.7.8 -> Ingress2 -> www.doe.com/test -> test_clusterip_svc Right now every new ingress I create sticks to 1.2.3.4.. If I point "www.doe.com" to the first IP, it just works, but with the second one I get a 404. I'm really new to all this stuff. I hope my question make sense.. Thank you in advance!!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Pablo, thanks for watching. I am assuming you are not with any cloud provider. We have load balancers readily available in cloud. MetalLB is designed for bare metal service. I don't think you can combine metallb and ingress in your cluster. You expose individual service in your cluster as load balancer type using MetalLB. So in this approach you create a load balancer endpoint for each service that you want to expose outside the cluster using MetalLB. Or you can use ingress controller in your cluster to take care of the routing logic and have just one external load balancer for all your applications. If you watch first 10 minutes of my ingress video, you will get a good understanding, where I used external Load Balancer HAProxy and not MetalLB as it is internal to the cluster. kzbin.info/www/bejne/mZnaoJmvfNdrZsU Cheers.
@coda2k
@coda2k 4 жыл бұрын
@@justmeandopensource Thank you very much for your prompt response (I'm Pablo, but this is my main account)!. I think I've made it by using different ingress.class annotations. I'll give it a try tomorrow and update you on that (maybe I could upload it to my github tomorrow and let you know, to see what you think about the idea..) Thank you one more time for your help and videos!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@coda2k Sure. No worries.
@pranavbhatia8736
@pranavbhatia8736 4 жыл бұрын
Hi, I am trying to follow metallb isnatllation from this video for my own deployment file. So my file looks like - apiVersion: apps/v1 kind: Deployment metadata: name: myapp-pod-2 labels: app: myapp type: front-end spec: selector: matchLabels: app: myapp template: metadata: labels: app: myapp type: front-end spec: containers: - name: nginx-controller image: nginx I use "kubectl create -f deploy-definition.yaml" to launch the deployment. After that I run -"kubectl expose deployment myapp-pod-2 --type=LoadBalancer --port=80" Then I installed the metal lb. And for the config I checked the pod ip address and changed the settings for range. On running "kubectl get all -o wide" this is the result for services running - service/myapp-pod-2 LoadBalancer 10.96.165.85 192.168.64.101 80:30187/TCP 5m8s app=myapp But on going to 192.168.64.101 it doesn't display the web page. Any idea where did I make a mistake? I am running it on minikube.
@mohamednehad5871
@mohamednehad5871 4 жыл бұрын
I think you need to relate it to your nodes range not the pods range
@MercedeX7
@MercedeX7 2 жыл бұрын
twrminal font is very big. kindly please reduce it 20 times at least. your picture is small. you need to increase picture size 10 times. that would make it better
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Thanks for the feedback. I will look into it. Cheers.
@MercedeX7
@MercedeX7 2 жыл бұрын
@@justmeandopensource thanks for taking rather sarcastic remarks into consideration. I and many people that i know, use youtube on cell phone not on tablet or laptop. so you need to adjust the screen size. as for your image, please understand that it's a technical subject so occupy the screen when introducing and when summarizing the video, but not have it during the whole video.
@event399
@event399 2 жыл бұрын
You are using cluster ip with load balancer but not use with public ip
@Pallikkoodam94
@Pallikkoodam94 4 жыл бұрын
If I add the second LB it is not working.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Ajeesh, thanks for watching. What is your kubernetes nodes ip range? and what range did you specify in the metallb configuration?
@Pallikkoodam94
@Pallikkoodam94 4 жыл бұрын
@@justmeandopensource protocol: layer2 addresses: - 172.42.42.110-172.42.42.120
@Pallikkoodam94
@Pallikkoodam94 4 жыл бұрын
service/nginx LoadBalancer 10.111.37.245 172.42.42.110 80:32213/TCP 55m service/www LoadBalancer 10.111.210.89 172.42.42.111 80:32562/TCP 4s First LB 172.42.42.110 is working but 172.42.42.111 not working.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@Pallikkoodam94 Try modifying the metallb-configmap with the range 172.42.42.240-172.42.42.250. This is what I use and it always worked for all the 10 IPs in that range. Don't ask me why its not working for the range you specified. I don't know the answer :) Thanks.
@Pallikkoodam94
@Pallikkoodam94 4 жыл бұрын
@@justmeandopensource yes it is working.. Thank you
@singaravelann3671
@singaravelann3671 4 жыл бұрын
Why don't you make an seperate course in Udemy with organising all the contents in clear way.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for your interest in this channel. i am doing this out of my passion and during my leisure time. I don't think I will have time to contribute to udemy.
@venkateshponnaganti8719
@venkateshponnaganti8719 4 жыл бұрын
hi im usingt aws cloud install k8s with ansible but i dont understand how to use loadbalancer service for my ingress rules plz zzz tell me or do aa video on that
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Venkatesh, thanks for watching. See if this link helps. aws.amazon.com/blogs/opensource/kubernetes-ingress-aws-alb-ingress-controller/
@venkateshponnaganti8719
@venkateshponnaganti8719 4 жыл бұрын
@@justmeandopensource hi sir I'm watching ur videos regularly but not on aws hosting I will tell u my requirement I'm installing k8s with andible I have to install all pods like Jenkins tomcat sonarqube nd redis nf rabbitmq with the helm I have attach persistent volume for all nd I have to use application load balancer for all pods I have to run and attach external ips with one load balancer I have to open all pods like load balancer ip/ Jenkins ,,, load balancer/tomcat for that I have to use ingress plzzz do one video on that plzzzzzz
@sanjaylonkar
@sanjaylonkar 2 күн бұрын
Thank you, Venkat, for this informative video. I used a public IP range instead of a private one to enable internet access for my services. Although one of the public IPs was assigned to my exposed service, I’m still unable to access it over the internet. Could you provide some guidance?
@suvankardas7932
@suvankardas7932 2 жыл бұрын
This video helped me a lot bro..many thx..was struggling for few factor ..thx once again
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Suvankar, thanks for watching. Cheers.
@onovaes
@onovaes 3 жыл бұрын
Thank man.... You helped a Brazilian guy!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Gabriel, thanks for watching. Glad it helped. Cheers.
@moma2189
@moma2189 4 жыл бұрын
hi guys. is metallb at the moment a good solution or is it deprecated? is there an alternativ?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. I believe there are other on-prem load balancing solutions out there which I haven't tried. MetalLB is robust enough to be used on-prem in my opinion. Cheers.
@MrNiceseb
@MrNiceseb 3 жыл бұрын
is the CLI type hinting from tmux? if not which tools is that thanks
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thats zsh-autosuggestion plugin that I use with Zsh shell. Nothing to do with tmux. I have done a video about the terminal setup where I have explained this. kzbin.info/www/bejne/qaCkqIinZ8iEfrM
@barkathks8620
@barkathks8620 4 жыл бұрын
HI Venkat, i have been watching you all videos, your videos are clean and clear to understand. But I have one doubt.... If we have IP's like as below then how to set up ip range in configmaps.yaml file. I took 3 EC2 instances of aws and i set up k8s cluster, one as master and two as worker nodes..... I am confusing to how to set up ip range in configmaps....hope you help me in this regards....thank you k8s-master: 172.31.23.226 worker-node1: 172.31.82.16 worker-node2: 172.31.88.98
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Barkath, thanks for watching. I am afraid it won't work in AWS. It is designed to be used in bare metal infrastructure. The IP addresses are not under your control when used in cloud. metallb.universe.tf/installation/clouds/
@justmeandopensource
@justmeandopensource 4 жыл бұрын
You can try this on your local workstation though in a VirtualBox environment.
@hazemhemied4049
@hazemhemied4049 3 жыл бұрын
I liked you video Simply straight to the point 👍
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Hazem, thanks for watching. Cheers.
@rizkyprilian2143
@rizkyprilian2143 3 жыл бұрын
Hi Venkat, thanks for the tutorial. However I still don't get the address pool, perhaps you could tell me how does metallb work. Let's say i have three vm nodes that each has their own private ip address. and then i set the metallb address pool with other private ip address within same subnets, but who owns those addresses since they are not belong to any vm nodes within the network?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Rizky, thanks for watching. Those IP addresses that you specify in the metallb configmap will be handed over by the virtual network interface. If you are running this in cloud, with 3 virtual machines, it won't work as you don't have control over the network interface/dhcp server. It is well suited in the bare-metal on-prem infrastructure.
@rizkyprilian2143
@rizkyprilian2143 3 жыл бұрын
@@justmeandopensource alright I understand now. I've also just watch your other video about Istio, in that video I noticed that you have different ip range for external IP than your internal node IP. Since you also mentioned metallb usage in that video, would you point me out any reference of how to do that? Thank you again
@rizkyprilian2143
@rizkyprilian2143 3 жыл бұрын
@@justmeandopensource in my case, my vm cluster has both internal private ip and public ip. I would like metallb use those public ips
@johancahyamanggala
@johancahyamanggala 4 жыл бұрын
help update this guide to new version kubernetes and using helm3 thankyou
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Johan, thanks for watching. Sure I will look into it.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Johan, i just had a look and nothing really changed significantly. The prcess is still applicable. Just the versions have changed. There is no use of helm3 in the installation process. Its still the same kubectl apply manifest file.
@jamilshaikh-tr2qb
@jamilshaikh-tr2qb 3 жыл бұрын
I have created my k8s environment over OpenStack, I have provided the address range in the config map of metallb. but the IP assigned is not reachable!
@jitendra2950
@jitendra2950 3 жыл бұрын
i am having kubernetes cluster with one master and two worker on vmware with centos machine. i have installed metallb and services. cluster heath is good but i am not able to get external ip for load balancer. config map also created with IP. Can you please help me where do i go to troubleshoot ?
@wibinem
@wibinem 5 жыл бұрын
Can you give the example MetalLB in BGP Mode? Thank you.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Wiebz, I will have a look at the documentation and understand how it works After trying it my network and if I get anywhere, I will definitely make a video of it. Thanks.
@tiwaridiwakarprasad
@tiwaridiwakarprasad 3 жыл бұрын
Thanks a lot bro! I've wasted two days just to understand the MetalLB Concept conflicts with nginx-ingress and so on... Your 11 minutes save my a lot of times.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Diwakar, no worries and thanks for watching.
@ranjeetbadhe3817
@ranjeetbadhe3817 Жыл бұрын
Thanks Venkat for posting the video. I am going to try this and ask for help , if I am not able configure.
[ Kube 33.1 ] How to deploy & use MetalLB in bare metal Kubernetes
12:30
Just me and Opensource
Рет қаралды 43 М.
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 3,2 МЛН
Please Help This Poor Boy 🙏
00:40
Alan Chikin Chow
Рет қаралды 15 МЛН
[ Kube 31 ] Set up Nginx Ingress in Kubernetes Bare Metal
30:17
Just me and Opensource
Рет қаралды 72 М.
Nginx Ingress Controller & Cert Manager Setup in 2024
16:21
david hwang
Рет қаралды 4,1 М.
Kubernetes Deconstructed: Understanding Kubernetes by Breaking It Down - Carson Anderson, DOMO
33:15
CNCF [Cloud Native Computing Foundation]
Рет қаралды 189 М.
Install MetalLB load balancer in Kubernetes
8:43
VirtualizationHowto
Рет қаралды 25 М.
[ Kube 35 ] Using Horizontal Pod Autoscaler in Kubernetes
24:59
Just me and Opensource
Рет қаралды 38 М.
High Availability Kubernetes on Bare Metal [A] - Muhammad Kamran Azeem & Henrik Høegh, Praqma
35:16
CNCF [Cloud Native Computing Foundation]
Рет қаралды 9 М.