Build a Kubernetes Home Lab from Scratch step-by-step!

Тәжірибелік нұсқаулар және стиль

Building a Kubernetes Home Lab environment from scratch might seem like a daunting task. However, it is actually pretty straightforward with the right tools in place. In this video, we are going to use Kubeadm to initialize a Kubernetes cluster from scratch in our home lab environment. Using Kubeadm takes some of the heavy lifting out of the underlying complexities of Kubernetes. We look at how to build the Kubernetes home lab cluster from scratch step-by-step. Join me in the adventure!
Subscribe to the channel: / @virtualizationhowto
My blog: www.virtualizationhowto.com
_____________________________________________________
Social Media: / vspinmaster
LinkedIn: / brandon-lee-vht
Github: github.com/brandonleegit
Introduction - 0:00
Talking about the lab environment and virtual machines needed - 0:53
How to leverage virtual machine snapshots in your home lab when learning Kubernetes - 2:13
Disabling virtual machine swap - 3:22
The actual commands to disable swap - 3:50
Installing Docker - 4:13
Installing CURL - 4:25
Adding the repository key for Kubernetes - 4:30
Adding the actual Kubernetes repository - 4:45
Running apt update - 4:55
Installing kubeadm, kubelet, kubectl, and Kubernetes - 5:02
Explaining why we are only running commands on the Kubernetes master node - 5:16
Running the kubeadm init command - 6:00
kubeadm init command finishes successfully and have the kubeadm join command - 6:20
The worker nodes are now caught up with the master node - 6:58
We still have the special join command to copy and paste into our worker nodes - 7:20
Notice the output of workers. They have successfully joined the Kubernetes cluster - 7:45
Kubectl commands are failing. This is because we haven't copied our kubeconfig to our HOME directory - 7:54
Nodes are in the not ready state. This is because we haven't deployed container networking - 8:30
We are going to deploy Calico for container networking - 8:45
After container networking we check the STATE of our Kubernetes nodes - 9:16
Wrapping up and thoughts on building a Kubernetes Home Lab from Scratch - 9:45
If you would like to read a full write up of how to build your Kubernetes Home Lab from scratch using virtual machines, read my blog post found here:
- www.virtualizationhowto.com/2...

Пікірлер: 148

  • @Kynsuji
    @Kynsuji8 ай бұрын

    This tutorial was quick and to the point. Was exactly what I needed to get over an issue I had when I was installing my k8s. Thank you!

  • @Ghost_Bear_Trader
    @Ghost_Bear_Trader3 ай бұрын

    Appreciate the steps. I also enjoyed the multicast storm in the background.

  • @arsarkadskov
    @arsarkadskov Жыл бұрын

    Hey. man Thanks a lot for this video I was stuck a bit with deploying k8s cluster in my home lab, but all videos I've watched before was something like "K8s and minikube in 1 hour" So now I've managed with deploying cluster on my CentOS 7 VMs and Proxmox as hypervisor

  • @maoryatskan6346
    @maoryatskan6346 Жыл бұрын

    Just completed "Kubernetes Cluster in Minutes in VMware vSphere using Rancher" and now I see new tutorial on the same topic, this is great! You're one of the best instructors on YT please keep it coming 🙏

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Maor, Thank you so much for your kind words! It is comments like this that make the time and effort of creating content for the channel worthwhile. Thank you again! Brandon

  • @scottennover4961
    @scottennover4961 Жыл бұрын

    Thank you. Completely demystified building my first K8s cluster. #subscribed

  • @RobertoDMaggi
    @RobertoDMaggi Жыл бұрын

    Hi! thanks for the really good video, what versions did you use?

  • @abdelazizsharaf7305
    @abdelazizsharaf7305 Жыл бұрын

    Great totorial .. I'm looking for one thing I have a pc, which I don't want to install it as a node .. could one install only kubectl on it and just give commands to cluster something like docker context .. where I just need docker-client and I'm switching contexts .. is that possible ?

  • @Spelter
    @Spelter Жыл бұрын

    So can i Install Kubernetes on different machines in KVM and just run a cluster on different architectures or do I have to differentiate between x86 on one side and Arm on the other ?

  • @selinoktay8372
    @selinoktay8372 Жыл бұрын

    calico doesnt install (calico pods are stuck at pending and nodes are stuck at NotReady). Do you know any other methods to install calico, especially newer versions (compatible with new Kubernetes)? I would really appreciate the help, been stuck for a week almost.

  • @Handelsbilanzdefizit
    @Handelsbilanzdefizit Жыл бұрын

    Very straight. Thank you.

  • @jscw2
    @jscw2 Жыл бұрын

    clean elegant and intuitive. thanks.

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    thank you Shang!

  • @escanorsama7922
    @escanorsama79226 күн бұрын

    Hello, Thanks for the video I am Ryad and I am new to Kubernetes. I have an issue with my cluster. I am trying to build a 3CP and 4W cluster, but when I tried to join the second control plane to the first one, it crashed, and I couldn't do anything. So here is my question: Do I need to install a simple cluster first like you did in the video and add the control planes after, or can I directly install all 3 control planes? Which type of Linux do you recommend (Debian, CentOS 7, Ubuntu) for which version of Kubernetes? Thanks a lot. Have a nice day.

  • @artursradionovs9543
    @artursradionovs9543 Жыл бұрын

    Is there any way that this could be achieved with no virtualisation, fully installed only on one OS? My machine does not support virtualisation, and cannot find any BIOS updates

  • @Elrevisor2k
    @Elrevisor2k7 ай бұрын

    Installing K8s as a container instead of a VM won’t help save some time or Do you recommend better to install it on a VM? Good video

  • @Iruini626
    @Iruini6268 ай бұрын

    Amazing and complete tutorial for a beginner. Short, concise, and it makes sense. But it would be good to explain like what calico does.

  • @VirtualizationHowto

    @VirtualizationHowto

    8 ай бұрын

    @lruini626, calico is the container networking overlay technology used in the Kubernetes cluster.

  • @VetinCloud
    @VetinCloud7 ай бұрын

    noob here, will this be enough to work an environment for the K8s admin exam. Thinking on using three VMs on azure tought.

  • @djbuffonage9500
    @djbuffonage95008 ай бұрын

    I am using virtual box I have 4gb ram in my computer What adapters are you using in your vms ?

  • @giftonpaulimmanuel146
    @giftonpaulimmanuel146 Жыл бұрын

    how did you create those 3 virtual machines?

  • @user-mo7gk6up5c
    @user-mo7gk6up5c2 ай бұрын

    i had problem with running kubectl command on worker nodes error message: 'The connection to the server localhost:8080 was refused - did you specify the right host or port?'

  • @TheAlirezak
    @TheAlirezak2 ай бұрын

    please for the nodes i'm gonna use a bridge network or NAT , thank you in advance

  • @cloudopensourcespecialistc6395
    @cloudopensourcespecialistc6395 Жыл бұрын

    this is great stuff. thanks for sharing

  • @transonit
    @transonit2 ай бұрын

    Very helpful, thank you so much.

  • @zexade4960
    @zexade49607 ай бұрын

    I did copy the configuration files but it still says connection refused when I run kubectl get nodes. Also the second node does not connect to control plane with key. Timeout error.

  • @Thanasislt1997
    @Thanasislt19978 ай бұрын

    I have followed the same steps exactly (1 node only) but my kube-system pods crash resulting to rendering the one node cluster off Something with calico pod starts the issue but I cannot identify the error. I have looked on the configuration of containerd, dockerd, and logs but I have made zero progress so far. Anyone has faced similar issues ? connection refused to the server :6443, - did you specify the right host or port?

  • @ashwiniravikumar314
    @ashwiniravikumar314 Жыл бұрын

    Sorry, missed how master and worker nodes are created?

  • @tech-jah.tech-talents
    @tech-jah.tech-talents5 ай бұрын

    Thanks for the insight. Please what did you do to be able to copy and paste across the nodes?

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    @tech-jah.tech-talents create a topic over on the VHT forums here: www.virtualizationhowto.com/community. Thank you for the comment!

  • @lengors7327
    @lengors7327 Жыл бұрын

    Thanks. This video sums it up very well. Thank you. One question though. Do you know if it's possible to add a node to cluster created with Docker Desktop?

  • @arjunbhatia3262
    @arjunbhatia3262 Жыл бұрын

    Hey, Great Video. Was there any version mismatch with Docker and Kubernetes since docker is going to be deprecated with Kubernetes? Thank you.

  • @flesz_

    @flesz_

    Жыл бұрын

    It will not get deprecated

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Arjun, thanks for the comment! Containerd will be supported moving forward

  • @mandeepmails
    @mandeepmails Жыл бұрын

    Awesome video tutorials you've come up with. Also, very professional and to the point. Keep it up ;-) i'm fond of supermicro for lab environment, learning good stuff here.

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Thank you Angry Bird! I really appreciate that and comments like this makes the time and effort involved worth it.

  • @alanlupsha5482
    @alanlupsha54823 ай бұрын

    Very nicely done. Can you show to expose a working NodePort or LoadBalancer on the local network? Assume you have a bridge, br0 working, and all VMs get their own DHCP address from pfsense or some router.

  • @ashotaloyan5781
    @ashotaloyan5781 Жыл бұрын

    Thanks!

  • @hvaandres
    @hvaandres Жыл бұрын

    What version of Ubuntu you are using because I did a lot of troubleshooting and I still have the same issue with running "kubeadm init" ?

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Andres, I believe when i made the video this was using Ubuntu 20.04 and before the change was made to remove Docker shim. Can you post the error you are getting?

  • @mugatu2017
    @mugatu20178 ай бұрын

    outstanding content

  • @ase713
    @ase713 Жыл бұрын

    Awesome video man! thanks. I was taking a course on K8 but It only went over how to setup using premade K8 tools on teh cloud. This is much beter and now I know how to create a local cluster and commit to master, as well ss implement from scratch on cloud (or at least I have an idea on where to start from). Stellar video man!

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    awe713, thanks for your comment! So glad it was helpful!

  • @lawrenceneo2294
    @lawrenceneo2294Ай бұрын

    Can you do a follow up tutorial how to add another Master node to make it fully HA?

  • @flesz_
    @flesz_ Жыл бұрын

    did you use bridged networking or NAT for your VMs? I am thinking for ingress bridged would be easier? Thanks

  • @manishsinha4896
    @manishsinha4896 Жыл бұрын

    How did you get 3 hosts?I used virtual box. Can I get 3 instances and get them working as master and working nodes?

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Sure thing Manish. It doesn't matter on the underlying hypervisor. You should be able to spin up 3 nodes in VirtualBox and have a master and 2 workers.

  • @ralmslb
    @ralmslb5 ай бұрын

    What WebUI would you recommend to manage a Home Kubernetes cluster similar like we use a cloud service like Azure?

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    @ralmslb, create a topic over on the VHT forums here: www.virtualizationhowto.com/community and let's discuss. Thank you for the comment!

  • @raymus1656
    @raymus1656 Жыл бұрын

    thanks for the material , really helpful. i got this error though , any workaround ? ------ The connection to the server master:6443 was refused - did you specify the right host or port?

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Ray, make sure you have exported your kubeconfig and copied it to the right location: mkdir -p $HOME/.kube && \ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config && \ sudo chown $(id -u):$(id -g) $HOME/.kube/config

  • @raymus1656

    @raymus1656

    Жыл бұрын

    @@VirtualizationHowto thx it works for a while then same connection refuse happens !!

  • @raymus1656

    @raymus1656

    Жыл бұрын

    like it works then after a while same problem happens

  • @wallmachine8780
    @wallmachine87805 ай бұрын

    Just to confirm all the commands you ran on the master besides kubeadm init needs to be run on the worker nodes?

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    @wallmachine8780 yes that is correct. Also, please checkout the updated steps here: www.virtualizationhowto.com/2023/12/how-to-install-kubernetes-in-ubuntu-22-04-with-kubeadm/. Please join the forums if you would like more personalized help as we can discuss further there: www.virtualizationhowto.com/community

  • @1987gabrielc
    @1987gabrielc Жыл бұрын

    Hola, qué herramientas de backup recomiendan para Kubernetes? gracias, Saludos

  • @Thecatboi
    @Thecatboi2 ай бұрын

    It will run for a moment, the pods restart a few times "proxy and manager", then I lose all connection to it with kubectl? Then randomly it works and I can see the pods yet again being up. Then it starts over. Anyone had this happen? Error: dial tcp *.*.*.*:6443: connect: connection refused

  • @psych0dude84
    @psych0dude8410 ай бұрын

    thanks for the tutorial, just a quick question: why are you running commands as sudo when you are already root?

  • @santiagosainz2110
    @santiagosainz2110 Жыл бұрын

    Would the process be the same if I have my VMs as EC2s in AWS?

  • @salimzenzouni

    @salimzenzouni

    3 ай бұрын

    this video shows how to in aws, ec2: kzread.info/dash/bejne/X6B8rdiTYtS_fbA.html

  • @2KDxCOMMONER
    @2KDxCOMMONER8 ай бұрын

    Where do you get kube.config file?

  • @mbiehl2
    @mbiehl2 Жыл бұрын

    Thank you for sharing this with everyone. One question I have - On the Kmaster node - I lost the join information that I needed to join the kworker1 and kworker2 to the cluster - how do I get the join command with the key to display again?

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Mike this command will reprint: kubeadm token create --print-join-command

  • @Josef-K
    @Josef-K6 ай бұрын

    How do I change this so I can use this behind a DHCP isp? I have a DDNS, but I can't seem to figure out how to change the config to point to a FQDN in kubernetes?

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    @josef_kul Thank you for the comment! Sign up on the forums and I can give more personalized help here: www.virtualizationhowto.com/community

  • @laracroft9079
    @laracroft9079 Жыл бұрын

    What is the purpose of setting up a k8s cluster? Is it the same as testing using minikube?

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Lara, a k8s cluster allows having the true redundancy needed for business-critical apps. You don't want to have a single node cluster for production as it would mean if your single Kubernetes host went down, so would all the containers. Having multiple hosts in a true cluster protects you from these types of scenarios.

  • @voiceoftreason1760
    @voiceoftreason176023 күн бұрын

    why don't you use an open source hypervisor at home?

  • @juanmarceloparra8452
    @juanmarceloparra8452 Жыл бұрын

    Great video! Can you please make a tutorial on how to create multiple K8s clusters on a single server?

  • @ase713

    @ase713

    Жыл бұрын

    Hi, I am new to K8S myself but I don't believe there is a reason to create cluster within a node. Instead, you can deploy multiple pods to a node. The node can only have one IP address and therefor you cannot create multiple nodes (cluster) within a single node. You can deploy multiple pods to any given single node (which may be what you are actually looking for); To do this, you can use "Deployment" object within your {deployment-config} file.

  • @heikoheine5506
    @heikoheine5506 Жыл бұрын

    Nice! :-D Now my cluster works fine on my PC. I had some trouble with the calico-part. I guess they have changed their name to tigera, or maybe the whole project changed?

  • @grover-
    @grover-8 ай бұрын

    Why did you run your commands using sudo when you were already root?

  • @DanielNeedles

    @DanielNeedles

    5 ай бұрын

    That threw me off. Installing as non root will not work. Took me a while to catch the '#' prompt sign as I depended too much on his use of sudo to imply non-root. Lol.

  • @raymus1656
    @raymus1656 Жыл бұрын

    i got this error when doing kubeadm init ----- error execution phase addon/kube-proxy: unable to create ConfigMap: rpc error: code = Unknown desc = malformed header: missing HTTP content-type

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Ray, check out here: github.com/kubernetes/kubeadm/issues/2701

  • @thewarrior9827
    @thewarrior98277 ай бұрын

    Just awesome 👏 I’m K8s certified (CKA & CKAD) but I can still tell you that you tough me something. Straight to the point and clear. Keep doing this nice work. I’ve joined your KZread community.

  • @Yamakassi85
    @Yamakassi856 ай бұрын

    What to do if the kube-apiserver just dies after a short while? connection refuse, nothing listening on port 6443

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    Thank you for the comment! Sign up on the forums and I can give more personalized help here: www.virtualizationhowto.com/community

  • @jamiehobson6336
    @jamiehobson6336 Жыл бұрын

    Can this be applied to standard machines. I have 3 mini lenovo desktops that I want to cluster together?

  • @jpbenavidescr

    @jpbenavidescr

    Жыл бұрын

    i guess if you install linux OS on those mini lenovos you should be able to do it

  • @afuzzyriff

    @afuzzyriff

    Жыл бұрын

    It should work the same. I am going to try on 3 dell optiplexs running Ubuntu

  • @mrwakko5715
    @mrwakko5715 Жыл бұрын

    Can you please put me on track how you have managed to copy and paste the JOIN command in the worker machines? If I am running in my local 3 different VMs in Virtual Box to simulate the ControlPlane and worker nodes, how you can communicate the copy-paste between them? I totaly got lost here. Thank you.

  • @thekarananand

    @thekarananand

    11 ай бұрын

    on all the VMs, Setup OpenSSH-server...... use 3 Terminal Windows on host to SSH into VMs....... then Copy Paste

  • @mrwakko5715

    @mrwakko5715

    11 ай бұрын

    @@thekarananand I will try thank you so much

  • @Smokey_McPot
    @Smokey_McPot Жыл бұрын

    Using `sudo` as root... outstanding move.

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Smokey thanks for the comment! Makes it easy for any to follow along regardless if you are using root or a sudo user :)

  • @eck1997rock
    @eck1997rock Жыл бұрын

    Would you rather virtualize some nodes to run kubernetes on (as you show in your video), or make a bare-metal kubernetes installation of a single controller node, considering you'd only have a single spare PC to run your kubernetes home cluster?

  • @robertkerr229

    @robertkerr229

    Жыл бұрын

    I'm using proxmox with 4 Ubuntu Server VMs as K8S nodes, installing with kubeadm, to get that different experience.

  • @isaacambi1914
    @isaacambi1914 Жыл бұрын

    How did you split your screen into three. I tried this several times to no avail. You said you would guide every step of the way. That's my problem with self learning, one small problem and you are stuck.

  • @grover-

    @grover-

    8 ай бұрын

    They are just three terminals

  • @karimgouem4593
    @karimgouem4593 Жыл бұрын

    Great video sir -hope you share your all of your commands on that subject ☺️

  • @sam2b77
    @sam2b77 Жыл бұрын

    At 8:07 I am intermittently having this error appear even after following instructions. Ubuntu 22 LTS. Also having the same error but regarding to port 6443. I can have success with running kubectl after re-running the export command (while as root), but the very next time kubectl is run I get the same error again. I've tried this on a VM and on a bare-metal machine. It's kinda driving me insane. :-) Advice please?

  • @abell12

    @abell12

    Жыл бұрын

    Having the exact same issue and also driving me insane. Have you managed to figure out what is causing it?

  • @sam2b77

    @sam2b77

    Жыл бұрын

    @@abell12 Hi. No, I never did figure this out, and gave up.

  • @abell12

    @abell12

    Жыл бұрын

    @@sam2b77 Hey, I actually did figure this out. Apparently it's some issue with Ubuntu 22.04 with containerd and it not creating the config file correctly. You can fix it by running these commands mkdir -p /etc/containerd/ containerd config default | sudo tee /etc/containerd/config.toml sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/g' /etc/containerd/config.toml

  • @stenlywolf

    @stenlywolf

    7 ай бұрын

    @@abell12 Great thanks! I was looking for a solution for a long time, it worked!

  • @nbctcp3450
    @nbctcp3450 Жыл бұрын

    1. 3:48 why u need to run sudo if u already root? 2. could u install as non root user

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    nbctcp3, thank you for your comment! I generally show as sudo even if root as this allows the steps to work even if non-root. You should be able to configure this as non-root using sudo commands.

  • @daturnerman76
    @daturnerman767 ай бұрын

    Maybe I'm just unlucky, but I encounter a persistent problem after adding the 2 worker nodes. The control plane will display the master node, but after adding the 2 workers, executing "kubectl get nodes" will result in a connection (:6443) error. I attempt to "export KUBECONFIG=/etc/kubernetes/admin.conf" again along with copying the admin.conf and assigning permissions. The first "kubectl get nodes" is successful, but after that it errors again. I think the master node is failing. Any suggestions?

  • @daturnerman76

    @daturnerman76

    7 ай бұрын

    I just tested it again with only the master control plane node and it failed after running "kubectl get nodes" twice - 3rd attempt failed.

  • @daturnerman76

    @daturnerman76

    7 ай бұрын

    Ended up ditching Calico for Flannel and everything is working now!

  • @All3me1
    @All3me1 Жыл бұрын

    How is creating a cluster with machines of different CPU architectures?

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    I wouldn't advise doing that. While it can be done, it can lead to weirdness and other issues.

  • @All3me1

    @All3me1

    Жыл бұрын

    @@VirtualizationHowto I have a homelab for learning purposes. Gonna try to have a kubernetes cluster with x86_64, arm 64 and arm 32 Wish me luck haha

  • @redseetpear
    @redseetpear Жыл бұрын

    is this video outdated? i followed the instructions and got [ERROR CRI]: container runtime is not running. and then i found K8s dropped docker support...

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Yang, most likely you are running into a cgroup driver issue between systemd and cgroupfs. Do the following: Run the following to check if it is running systemd: ------------------------------------------------------ if grep "SystemdCgroup = true" /etc/containerd/config.toml &> /dev/nul; then driver=systemd else driver=cgroupfs fi echo "driver is ${driver}" ---------------------------- If it returns systemd....run the following two commands: mv /etc/containerd/config.toml /etc/containerd/config.toml.bak systemctl restart containerd You should be able to run the following command and see that it grabs the images without error: kubeadm config images pull If the images pull correctly, you should be able to successfully bring up the cluster: sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=all Take a look at the official Kubernetes documentation on cgroup driver here: kubernetes.io/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/

  • @andrewhollowaym

    @andrewhollowaym

    Жыл бұрын

    @@VirtualizationHowto Not the original poster but I have the same issue... I tried your solution but I get "unexpected token near `echo`". So I removed the echo statement and got no response. what do I have to do?

  • @shantidutbansode2
    @shantidutbansode2 Жыл бұрын

    "sudo kubeadm init" just doesnt work coz of kubelet. Wasted 2 days trying and debugging with diff diff Ubuntu versions but its still the same. I dont know how for him it goes so smooth. It seems like the kubelet isn't running or healthy

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    shantidut, thank you for the comment! Try the following. I have tested in my lab and this works when receiving the same error you are receiving with Ubuntu 22.04. Most likely you are running into a cgroup driver issue...it must match what is used by kubeadm or the kubelet won't come online. Run the following to check if it is running systemd: ------------------------------------------------------ if grep "SystemdCgroup = true" /etc/containerd/config.toml &> /dev/nul; then driver=systemd else driver=cgroupfs fi echo "driver is ${driver}" ---------------------------- If it returns systemd....run the following two commands: mv /etc/containerd/config.toml /etc/containerd/config.toml.bak systemctl restart containerd You should be able to run the following command and see that it grabs the images without error: kubeadm config images pull If the images pull correctly, you should be able to successfully bring up the cluster: sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=all Take a look at the official Kubernetes documentation on cgroup driver here: kubernetes.io/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/

  • @VZR_

    @VZR_

    Жыл бұрын

    @@VirtualizationHowto bro tysm i spent so much time lookin for a solution to this!

  • @giovanniguarino588
    @giovanniguarino5887 ай бұрын

    hello and thank you But we had a lot of problems.

  • @joseiriarte1982
    @joseiriarte19822 ай бұрын

    Question from an ignorant person in the hope someone with the knowledge will answer and either explain or guide me on my learning. I have 3 laptops, one of them my use-daily one. The others with smaller processing power, I am running Llama.cpp on my main laptop. Will the Kubernets help me to achive a greater processing power if I turn the other two into a slaves, or are Kubernets only for web base applications?

  • @yotu9670
    @yotu967025 күн бұрын

    But why docker? Why not containerio/something else? Fast tutorial!!! And yeah installing k8s from scratch is pretty easy and straightforward. And even setting up a load balancer: Metallb is easy. A distributed storage could be a bit more komplex. At least I haven’t done it so far.

  • @abessesmahi4888
    @abessesmahi4888 Жыл бұрын

    Awesome tutorial Thank you so much for your efforts Subscribed

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Thank you Absesse!

  • @VIKOVO86
    @VIKOVO86 Жыл бұрын

    This is a great tutorial, thank you for that. I'm running into an issue. I have been searching google for answers. I got this error and never got the join command output. If you have any pointers, i'd greatly appreciate it. [WARNING SystemVerification]: missing optional cgroups: blkio error execution phase preflight: [preflight] Some fatal errors occurred:

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Marco what OS are you using?

  • @funkynunu

    @funkynunu

    Жыл бұрын

    Hi Marco, had the same issue with Ubuntu 22.04. Also had issues with the kubelet constantly crashing and restarting. Ubuntu 20.04 worked a treat. @VirtualizationHowto - thank you, great tut!

  • @vcp93
    @vcp93 Жыл бұрын

    Thanks for sharing the info. Is this going to be a series or was this just a "bit sized" one off video? Cheers! 😉

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Frank, thanks for the comment. That is a great idea and definitely one I will consider. A series would be a great way to cover additional topics. Thanks again!

  • @webpro607
    @webpro607 Жыл бұрын

    Kubernetes' built-in dockershim component was removed in release v1.24 , so Docker will not be supported anymore i guess

  • @endymionspr9916

    @endymionspr9916

    Жыл бұрын

    'docker' doesn't mean anything in this context. You can still build containers with docker and run them with containerd, cri-o or whatever.

  • @seizuresalad91

    @seizuresalad91

    7 ай бұрын

    @@endymionspr9916 exactly, it's the runtime, and only an "issue" if you are upgrading preexisting environments that utilize the Docker runtime; wasn't too much of a pain. Just gotta cordon off and drain your nodes, or simply scale down replicas, followed by removing docker and updating kubelet, depending on which runtime you desire.

  • @Linux_User_68
    @Linux_User_6811 ай бұрын

    Thanks for showing us how to do it from scratch. I suggest not cutting the terminal output part to make the video short!

  • @pedro_8240
    @pedro_82402 ай бұрын

    I got error after error, the links in the description showed different steps from what was shown in the video. I needed to adapt a bunch of stuff to get be able to get it somewhat running, looking for information in other places at times to fill the gaps. Either show every command and step properly in the video, or have a a companion article with the proper steps, otherwise this video will cause more confusion that anything else.

  • @user-tg3nd6me9l
    @user-tg3nd6me9l5 ай бұрын

    I thought the purpose of using kubernetes in a home lab was to have each node on a different physical machine?

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    @user-tg3nd6me9l thank you for the comment! It would be in a true production scenario. Most will run VMs on different physical hosts and make sure these are always on different hosts for that reason. In a lab environment for learning, many may run these on the same host to create their K8s cluster.

  • @anthonysox2001
    @anthonysox20013 ай бұрын

    swiss knife👌

  • @juniali123
    @juniali123 Жыл бұрын

    If you would have put the commands on the note paid, it would have been awesome

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Syed, here you go :) ##Disable swap sudo swapoff -a && \ sudo nano /etc/fstab ##Install Docker in Ubuntu docs.docker.com/engine/install/ubuntu/ #Install Curl sudo apt install apt-transport-https curl -y ##Download Google GPG key and add repo curl -s packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add && \ sudo apt-add-repository "deb apt.kubernetes.io/ kubernetes-xenial main" ##Update and install Kubernetes tools sudo apt update && \ sudo apt install kubeadm kubelet kubectl kubernetes-cni -y ##Build the Kubernetes cluster sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=all ##Copy kube config mkdir -p $HOME/.kube && \ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config && \ sudo chown $(id -u):$(id -g) $HOME/.kube/config ##Kubernetes overlay networking kubectl apply -f docs.projectcalico.org/manifests/calico.yaml ##Kubernetes join command if needed kubeadm token create --print-join-command ##Problem with kubelet failing? Run the following to check if it is running systemd: ------------------------------------------------------ if grep "SystemdCgroup = true" /etc/containerd/config.toml &> /dev/nul; then driver=systemd else driver=cgroupfs fi echo "driver is ${driver}" ---------------------------- If it returns systemd....run the following two commands: mv /etc/containerd/config.toml /etc/containerd/config.toml.bak systemctl restart containerd You should be able to run the following command and see that it grabs the images without error: kubeadm config images pull If the images pull correctly, you should be able to successfully bring up the cluster and rerun the kubeadmin init command

  • @jpbenavidescr

    @jpbenavidescr

    Жыл бұрын

    @@VirtualizationHowto thanks this is of great help.

  • @rickbhattacharya2334
    @rickbhattacharya233410 ай бұрын

    Sadly this doesn't works in local environment (hypervisor KVM) I tried following your video here are the issues I faced. 1. Docker isn't supported so had to go in seperate guide. 2. Faced issues with iptable which i had to search manually to fix 3. faced issue with kubeadam init where it's giving error that unable to create service account. ( Was not able to fix this) An updated video would be really helpful where the VMs doesn't have a public IP and it's totally done in internal network

  • @xXhotshot55Xx
    @xXhotshot55Xx5 ай бұрын

    You don't need to use sudo when you're already root.

  • @INFORMATIQUE-POUR-TOUS
    @INFORMATIQUE-POUR-TOUS Жыл бұрын

    🔴 Kubernetes 1 : Comment installer correctement kubernetes master et son dashboard 🚀 kzread.info/dash/bejne/hImhwdZrgJS7p9Y.html

  • @davidgates1887
    @davidgates1887Ай бұрын

    I’ve tried the clusters I can’t get it I don’t know how to wire them. I don’t know how fuck thing you guys are talking about. I’ve got a lot of computers I want to put together like we talk about 12 or 13 computers and summer new summer old I’d like to have them all running in the cluster. You guys just confuse the hell out of me but I like to came anyways didn’t want you to waste your time. Thanks.

  • @businessgoose8605
    @businessgoose86053 ай бұрын

    sheeet dont work. init command fail's with multiple errors. Time for google.

  • @Andersoncrls
    @Andersoncrls2 ай бұрын

    Aviso para quem veio em 2024, este tutorial não funciona mais para instalação, é só um aviso.

  • @fanuchman
    @fanuchman Жыл бұрын

    Problem with all these videos is they stop short of remote control through RBAC or Rancher. No one should be administering their cluster from the control node.

  • @VirtualizationHowto

    @VirtualizationHowto

    Жыл бұрын

    Ari, definitely a good shout and RBAC is a must for production workloads.

  • @2KDxCOMMONER
    @2KDxCOMMONER8 ай бұрын

    Installation is failling, please let me know how to install in right manner

  • @teemu3436
    @teemu34367 ай бұрын

    is it me or is his voice and face not synced right

  • @yotu9670

    @yotu9670

    25 күн бұрын

    Yeah it’s A bit off but not much.

  • @AdrianoBritoProfile
    @AdrianoBritoProfile2 ай бұрын

    Not exactly "from scratch".

  • @TotallyNotAuroras2ndChannel
    @TotallyNotAuroras2ndChannel6 ай бұрын

    Are you Bruce Lee long lost son?

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    guilty as charged, j/k :)

  • @64242359
    @642423595 ай бұрын

    it was okay until you mentioned calico and didnt talk much on that.

  • @VirtualizationHowto

    @VirtualizationHowto

    5 ай бұрын

    @64242359, hop over to the forums and I can give you more personalized help www.virtualizationhowto.com/community