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

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 163

  • @Kynsuji
    @Kynsuji Год назад +16

    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!

  • @maoryatskan6346
    @maoryatskan6346 2 года назад +7

    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  2 года назад

      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

  • @MikeO89
    @MikeO89 3 месяца назад +1

    Ugh thank you for showing how to actually do it! A shocking number of instructions for kubernetes are sooo surface level

  • @scottennover4961
    @scottennover4961 Год назад +6

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

  • @Iruini626
    @Iruini626 Год назад +2

    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  Год назад

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

  • @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

  • @transonit
    @transonit 8 месяцев назад +1

    Very helpful, thank you so much.

  • @grover-
    @grover- Год назад +4

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

    • @DanielNeedles
      @DanielNeedles 11 месяцев назад

      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.

  • @alanlupsha5482
    @alanlupsha5482 9 месяцев назад

    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.

  • @giftonpaulimmanuel146
    @giftonpaulimmanuel146 Год назад +2

    how did you create those 3 virtual machines?

  • @lawrenceneo2294
    @lawrenceneo2294 7 месяцев назад

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

  • @Smokey_McPot
    @Smokey_McPot Год назад +1

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

    • @VirtualizationHowto
      @VirtualizationHowto  Год назад +1

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

  • @selinoktay8372
    @selinoktay8372 Год назад +2

    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.

    • @bigmofree
      @bigmofree 28 дней назад

      hey! did you find fix for it? Please let me know!

    • @selinoktay8372
      @selinoktay8372 28 дней назад

      @@bigmofree its been so long since i did this, sorry i have no idea whether or not (or how) i solved it.

  • @thewarrior9827
    @thewarrior9827 Год назад

    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 RUclips community.

  • @hvaandres
    @hvaandres Год назад +2

    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?

  • @zyghom
    @zyghom 3 месяца назад

    super nice just I am not sure why you used sudo while being root already

  • @jscw2
    @jscw2 2 года назад +1

    clean elegant and intuitive. thanks.

  • @tech-jah.tech-talents
    @tech-jah.tech-talents 11 месяцев назад

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

    • @VirtualizationHowto
      @VirtualizationHowto  11 месяцев назад

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

  • @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 ?

  • @TheAlirezak
    @TheAlirezak 8 месяцев назад

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

  • @yotu9670
    @yotu9670 6 месяцев назад

    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.

  • @Thecatboi
    @Thecatboi 8 месяцев назад +2

    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

    • @avraw
      @avraw Месяц назад

      yes not sure what to do

  • @Spelter
    @Spelter Год назад +1

    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 ?

  • @raymus1656
    @raymus1656 2 года назад +1

    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  2 года назад

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

  • @Handelsbilanzdefizit
    @Handelsbilanzdefizit Год назад +1

    Very straight. Thank you.

  • @ashwiniravikumar314
    @ashwiniravikumar314 Год назад +2

    Sorry, missed how master and worker nodes are created?

    • @ltcstx
      @ltcstx 4 месяца назад

      That's an entirely different video. The video title is very misleading. This is not from "scratch" nor is it
      "baisc".

  • @Florian-dd1mg
    @Florian-dd1mg 5 месяцев назад

    in a other video i saw a guy connecting the nodes with nat und bridges together. Did you do such thing too?

  • @raymus1656
    @raymus1656 2 года назад +1

    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  2 года назад

      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 2 года назад

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

    • @raymus1656
      @raymus1656 2 года назад

      like it works then after a while same problem happens

  • @arjunbhatia3262
    @arjunbhatia3262 2 года назад +1

    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_ 2 года назад

      It will not get deprecated

    • @VirtualizationHowto
      @VirtualizationHowto  Год назад

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

  • @escanorsama7922
    @escanorsama7922 6 месяцев назад

    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.

  • @mugatu2017
    @mugatu2017 Год назад

    outstanding content

  • @razrazvan72
    @razrazvan72 Месяц назад

    how can I connect this instance to OpenLens ?

  • @zexade4960
    @zexade4960 Год назад

    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.

  • @isrbillmeyer
    @isrbillmeyer 6 дней назад

    Ever tried Kubernetes on XCP-NG?

  • @ralmslb
    @ralmslb 11 месяцев назад

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

    • @VirtualizationHowto
      @VirtualizationHowto  11 месяцев назад

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

  • @juanmarceloparra8452
    @juanmarceloparra8452 Год назад +1

    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.

    • @mannedmodule
      @mannedmodule 5 месяцев назад

      @@ase713 Or, in this video, the three VMs shown form one cluster and all three VMs are in one server. Simply repeat the process with another set of VMs for another cluster. Controlling the two clusters with kubectl will then require context switching. But heck, why not simply have one cluster with six VMs and partition the resources with namespaces?

  • @Josef-K
    @Josef-K Год назад

    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  11 месяцев назад

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

  • @cloudopensourcespecialistc6395
    @cloudopensourcespecialistc6395 2 года назад

    this is great stuff. thanks for sharing

  • @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 Год назад

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

    • @mrwakko5715
      @mrwakko5715 Год назад

      @@thekarananand I will try thank you so much

  • @ase713
    @ase713 Год назад +1

    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!

  • @Yamakassi85
    @Yamakassi85 Год назад

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

    • @VirtualizationHowto
      @VirtualizationHowto  11 месяцев назад

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

  • @voiceoftreason1760
    @voiceoftreason1760 6 месяцев назад

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

  • @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- Год назад

      They are just three terminals

  • @wallmachine8780
    @wallmachine8780 11 месяцев назад

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

    • @VirtualizationHowto
      @VirtualizationHowto  11 месяцев назад +1

      @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

  • @mandeepmails
    @mandeepmails 2 года назад +6

    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  2 года назад +1

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

  • @VetinCloud
    @VetinCloud Год назад

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

  • @djbuffonage9500
    @djbuffonage9500 Год назад

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

  • @Elrevisor2k
    @Elrevisor2k Год назад

    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

  • @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.

  • @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

  • @Linux_User_68
    @Linux_User_68 Год назад +1

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

  • @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

  • @shantidutbansode2
    @shantidutbansode2 Год назад +1

    "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  Год назад +3

      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!

  • @daturnerman76
    @daturnerman76 Год назад

    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 Год назад

      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 Год назад

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

  • @RobertoDMaggi
    @RobertoDMaggi Год назад

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

  • @Thanasislt1997
    @Thanasislt1997 Год назад

    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?

  • @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

  • @santiagosainz2110
    @santiagosainz2110 Год назад

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

    • @salimzenzouni
      @salimzenzouni 9 месяцев назад

      this video shows how to in aws, ec2:
      ruclips.net/video/-lHKvZ2qYMM/видео.html

  • @webpro607
    @webpro607 2 года назад +12

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

    • @endymionspr9916
      @endymionspr9916 Год назад +8

      '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 Год назад +1

      @@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.

    • @centeura1435
      @centeura1435 4 месяца назад

      You still can add the docker cri, it's a little complicated but you get it done

  • @laracroft9079
    @laracroft9079 2 года назад

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

    • @VirtualizationHowto
      @VirtualizationHowto  2 года назад

      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.

  • @dothgaerwenoakblossom15
    @dothgaerwenoakblossom15 4 месяца назад

    why sudo all the time if you are root anyways?

  • @psych0dude84
    @psych0dude84 Год назад +1

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

  • @ashotaloyan5781
    @ashotaloyan5781 Год назад

    Thanks!

  • @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?

  • @heikoheine5506
    @heikoheine5506 Год назад +2

    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?

  • @giovanniguarino588
    @giovanniguarino588 Год назад

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

  • @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?

  • @2KDxCOMMONER
    @2KDxCOMMONER Год назад

    Where do you get kube.config file?

  • @sam2b77
    @sam2b77 2 года назад

    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 Год назад +1

      @@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 Год назад

      @@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.

  • @juniali123
    @juniali123 2 года назад

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

    • @VirtualizationHowto
      @VirtualizationHowto  Год назад +4

      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.

  • @pedro_8240
    @pedro_8240 8 месяцев назад

    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.

  • @JustThinkingAboutIt-i5k
    @JustThinkingAboutIt-i5k Год назад

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

    • @VirtualizationHowto
      @VirtualizationHowto  11 месяцев назад

      @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.

  • @karimgouem4593
    @karimgouem4593 Год назад

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

  • @xXhotshot55Xx
    @xXhotshot55Xx 11 месяцев назад

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

  • @davidgates1887
    @davidgates1887 7 месяцев назад +1

    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.

  • @mbiehl2
    @mbiehl2 2 года назад

    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  2 года назад +1

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

  • @1987gabrielc
    @1987gabrielc 2 года назад

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

  • @joseiriarte1982
    @joseiriarte1982 8 месяцев назад

    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?

  • @rickbhattacharya2334
    @rickbhattacharya2334 Год назад +1

    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

  • @abessesmahi4888
    @abessesmahi4888 Год назад

    Awesome tutorial
    Thank you so much for your efforts
    Subscribed

  • @flesz_
    @flesz_ Год назад

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

  • @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 Год назад +1

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

  • @BrankoPavlovic-m7t
    @BrankoPavlovic-m7t 8 месяцев назад

    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?'

  • @anthonysox2001
    @anthonysox2001 9 месяцев назад

    swiss knife👌

  • @VIKOVO86
    @VIKOVO86 2 года назад

    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  2 года назад

      Marco what OS are you using?

    • @funkynunu
      @funkynunu 2 года назад

      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!

  • @prezlamen
    @prezlamen 3 месяца назад

    This is impossible to see, font is tiny, use size 20 or more for RUclips

  • @ltcstx
    @ltcstx 4 месяца назад

    The video title is very misleading. This is not from "scratch" nor is it
    "baisc" for those of yall who are confused and are running into trouble. "Pre-requisites in place" is crucial for this "guide"

  • @fanuchman
    @fanuchman 2 года назад

    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  2 года назад

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

  • @Andersoncrls
    @Andersoncrls 8 месяцев назад

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

  • @vcp93
    @vcp93 2 года назад

    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  2 года назад

      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!

  • @businessgoose8605
    @businessgoose8605 9 месяцев назад

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

  • @teemu3436
    @teemu3436 Год назад

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

    • @yotu9670
      @yotu9670 6 месяцев назад

      Yeah it’s A bit off but not much.

  • @jakubsarnowski9050
    @jakubsarnowski9050 4 месяца назад

    Too bad you forgot to mention (in both your video and blog post) that worker machines require almost the same configuration steps in terms of swap, cgroup etc.) - wasted a lot of time backtracking because of that.

  • @2KDxCOMMONER
    @2KDxCOMMONER Год назад

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

  • @64242359
    @64242359 11 месяцев назад +1

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

    • @VirtualizationHowto
      @VirtualizationHowto  11 месяцев назад

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

  • @LuvxJacqu4li8e
    @LuvxJacqu4li8e Год назад

    Are you Bruce Lee long lost son?

  • @INFORMATIQUE-POUR-TOUS
    @INFORMATIQUE-POUR-TOUS Год назад

    🔴 Kubernetes 1 : Comment installer correctement kubernetes master et son dashboard 🚀
    ruclips.net/video/RUm_t2P1Uws/видео.html

  • @shushev
    @shushev День назад

    at least explain the commands what they do? :D

  • @AdrianoBritoProfile
    @AdrianoBritoProfile 8 месяцев назад

    Not exactly "from scratch".