Install Kubernetes Cluster with kubeadm (Linux VM/Mac/Windows, x86/Arm)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 130

  • @dhij
    @dhij  2 ปีที่แล้ว +6

    Please note one important step that I forgot to go over in the video--make sure to forward IPv4 and let iptables see the bridged traffic as described: kubernetes.io/docs/setup/production-environment/container-runtimes/#forwarding-ipv4-and-letting-iptables-see-bridged-traffic

    • @jasoncoltrin6181
      @jasoncoltrin6181 2 ปีที่แล้ว

      at which step is the forward created? Right before kubeadm init?

    • @dhij
      @dhij  2 ปีที่แล้ว

      @@jasoncoltrin6181 either before or after, that shouldnt matter too much!

    • @jasoncoltrin6181
      @jasoncoltrin6181 2 ปีที่แล้ว

      @@dhij Awesome finally all my pods are running! How many of these steps need to be done on the nodes prior to running the kubeadm join ?

    • @dhij
      @dhij  2 ปีที่แล้ว

      @@jasoncoltrin6181 Awesome! Once you do your kubeadm init and set up your pod networking on your controlplane node, the kubeadm join should work fine

    • @Prashant-ig1ny
      @Prashant-ig1ny 11 หลายเดือนก่อน

      I have done the Forwarding IPv4 and letting iptables see bridged traffic but still the pods of calico-kube-controllers, calico-node and coredns are not coming up as ready.

  • @paul_fm
    @paul_fm ปีที่แล้ว +6

    This video tutorial continues to be effective in the third quarter of 2023. Extremely helpful!

    • @dhij
      @dhij  ปีที่แล้ว

      Thank you for confirming!

  • @TeemoPwnstar
    @TeemoPwnstar 4 หลายเดือนก่อน +1

    For anyone having problems getting the init to work (timeout crash after 4min), you have to turn swap off (sudo swapoff -a). Thanks for awesome video.

  • @omza10
    @omza10 ปีที่แล้ว

    The documentation can be pretty complicated and most of the tutorial that I saw aren't showing how to install kubernetes as it described in the documentation.
    After watching this video I was able to install it, thank you!

    • @dhij
      @dhij  ปีที่แล้ว +1

      Exactly! Awesome, glad that helped!

  • @jasoncoltrin6181
    @jasoncoltrin6181 2 ปีที่แล้ว +2

    thank you so much for this, I've been trying to get kubernetes running using outdated videos and hit all kinds of depreciation issues

    • @dhij
      @dhij  2 ปีที่แล้ว

      Glad it helped!

  • @ritiktiwari360
    @ritiktiwari360 2 ปีที่แล้ว +3

    big thank you bro you solve my problem ,i am stuck continue 3 days ago now , my k8s error free big thank you.

    • @dhij
      @dhij  2 ปีที่แล้ว

      You welcome, glad it helped!

  • @kunal-gohrani
    @kunal-gohrani ปีที่แล้ว

    I was trying to install kubernetes using kubeadm from past 2 days in a ubuntu arm64 vm in mac os m1. Your video helped me!

  • @MrSuriyam
    @MrSuriyam ปีที่แล้ว +1

    Thank you for the full installation video. Appreciate it sir.

  • @leo5946
    @leo5946 2 ปีที่แล้ว +1

    best guide to help you understand creating a 3 node cluster.

    • @dhij
      @dhij  2 ปีที่แล้ว

      Thank you!

  • @berozgaarpalash
    @berozgaarpalash หลายเดือนก่อน

    Thanks David, well explained installation process.

  • @shubhamkumbhar7660
    @shubhamkumbhar7660 4 หลายเดือนก่อน

    Thank you so much for making this video, I was passing wrong cni pod cidr that caused errors. After seeing this guide I was able to create cluster without any issues 😃🙏

    • @dhij
      @dhij  4 หลายเดือนก่อน +1

      Glad to hear it worked out for you 🙂

  • @richlawson3003
    @richlawson3003 2 หลายเดือนก่อน

    Great instructions helped my undderstand the concepts.

  • @suneelkumar5175
    @suneelkumar5175 2 ปีที่แล้ว

    Great work man I used to set up the k8s cluster a few years ago and things got changed a lot since then and now when I am trying to set up a cluster it is not working as previously now your tutorial saved me Thanks man.

    • @dhij
      @dhij  2 ปีที่แล้ว

      Glad to hear, thank you!

  • @pjj7466
    @pjj7466 ปีที่แล้ว

    Thank you so much brother and till now I have seen many TH-cam videos and they all are provided a custom commands for installing kubernetes cluster but other not working at all and I have face many problems doing those so actually I found a great video right now thank you so much for showing the how to setup to kubeadm kubernetes cluster with official documentation.

    • @dhij
      @dhij  ปีที่แล้ว

      Glad that helped!!

  • @yoRebooorn
    @yoRebooorn ปีที่แล้ว

    Thank you so much for your explanation, I've been blocked in kubernetes installation on a Ubuntu distro for so long

    • @dhij
      @dhij  ปีที่แล้ว

      Glad that helped!

  • @180doman
    @180doman 2 ปีที่แล้ว +4

    Man, you saved me with this one. Im setting up k8s cluster with kubeadm for the first time and got stuck with this "multiple socket" problem from kubeadm init command. Adding --cri-socket parameter solved it! It would be great if you would make some video about metalb integration to the cluster (for ingress).

    • @dhij
      @dhij  2 ปีที่แล้ว +1

      Great! I actually came across a blog post a few days ago that used metallb for networking, this might help: rpi4cluster.com/k3s/k3s-nw-setting/

  • @Mussalin97
    @Mussalin97 ปีที่แล้ว +1

    thank you for your video. very well explained tutorial!

    • @dhij
      @dhij  ปีที่แล้ว +1

      thank you!

  • @michaelmellor6061
    @michaelmellor6061 ปีที่แล้ว

    Awesome video really helped give a clear explanation of the setup, the kube docs are good but a clear well paced video like this really helps

    • @dhij
      @dhij  ปีที่แล้ว

      glad it helped!

  • @rashidahamed6234
    @rashidahamed6234 2 ปีที่แล้ว

    Hi, Thank you very much. finally my k8s cluster in cloud vm, up and running :))

    • @dhij
      @dhij  2 ปีที่แล้ว

      Awesome!

  • @danielorgepeon3211
    @danielorgepeon3211 7 หลายเดือนก่อน

    Como te quiero chavalín!!! Eres un grande

  • @HdeHidratado
    @HdeHidratado ปีที่แล้ว

    Great work man. I've been trying to setup it up for about a week, and was finally able after watching your video. My main issue was that I wasn't setting the correct 'cidr' flag, for the cni plugins I tried.

    • @dhij
      @dhij  ปีที่แล้ว

      Nice, glad that helped!

  • @sameman2218
    @sameman2218 ปีที่แล้ว

    Thanks a lot. The best guide for k8s setup👍

    • @dhij
      @dhij  ปีที่แล้ว

      appreciate it!

  • @qubit3807
    @qubit3807 ปีที่แล้ว

    Thank you very much for this guide, deeply appreciated!

    • @dhij
      @dhij  ปีที่แล้ว

      glad that helped!

  • @boopalanpichandi8178
    @boopalanpichandi8178 2 ปีที่แล้ว

    Awesome bro ❤very useful of your guidance for setup kubernet on server 🔥

    • @dhij
      @dhij  2 ปีที่แล้ว +1

      Glad it helped bro!

  • @alexanderbelkin5978
    @alexanderbelkin5978 ปีที่แล้ว

    Thanks tou David! It's was very helpfull!

  • @angeldelafuente1329
    @angeldelafuente1329 8 หลายเดือนก่อน

    Hello David,
    2 questions:
    a) do I have to forward the ipv4 also on the working node?
    b) how do I join the working node to the control plane?
    Everything else seems to be working ;-)

    • @angeldelafuente1329
      @angeldelafuente1329 8 หลายเดือนก่อน

      I respond myself.
      a) not necessary
      b) coping the command with the token of the control plane
      thanks David ;-)

  • @alex_uzl
    @alex_uzl 10 หลายเดือนก่อน

    Omg dude, you're the best

  • @SmailELMOFADDAL
    @SmailELMOFADDAL 10 หลายเดือนก่อน

    Thank you for the tutorial it's pretty helpfull,
    I have a question please, after the install of Calico by the yaml file, I have got the error:
    The connection to the server :6443 was refused - did you specify the right host or port?

    • @dhij
      @dhij  10 หลายเดือนก่อน

      it might mean that the default api server that calico is configured to use is different from where your apiserver is actually running

    • @SmailELMOFADDAL
      @SmailELMOFADDAL 10 หลายเดือนก่อน

      Thank you for your reply, after investigation, it turns out that I should have installed the container runtime and Kubernetes as root user instead of another admin user, that worked perfectly after doing so
      Thank you again for your help :)

  • @nohandsignal
    @nohandsignal ปีที่แล้ว

    subscribed in less than a minute draggging the video

    • @dhij
      @dhij  ปีที่แล้ว

      hahah thanks man!

  • @apidas
    @apidas 2 ปีที่แล้ว

    very good tutorial, pretty comprehensive

    • @dhij
      @dhij  2 ปีที่แล้ว

      Appreciate it!

  • @ilkeradiguzel7804
    @ilkeradiguzel7804 2 ปีที่แล้ว

    Appreciate the good work mate

    • @dhij
      @dhij  2 ปีที่แล้ว

      thank you mate!

  • @akhtarshah7944
    @akhtarshah7944 ปีที่แล้ว

    Classic work Great Man

    • @akhtarshah7944
      @akhtarshah7944 ปีที่แล้ว

      soulation:
      ---------
      root@ubuntu:~# cp /etc/kubernetes/admin.conf $HOME/
      root@ubuntu:~# chown $(id -u):$(id -g) $HOME/admin.conf
      root@ubuntu:~# export KUBECONFIG=$HOME/admin.conf
      root@ubuntu:~# echo 'export KUBECONFIG=$HOME/admin.conf' >> $HOME/.bashrc
      root@ubuntu:~# kubectl get pod -A --watch
      NAMESPACE NAME READY STATUS RESTARTS AGE
      kube-system calico-kube-controllers-57b57c56f-kddcs 1/1 Running 1 (43m ago) 19h
      kube-system calico-node-pb42t 1/1 Running 1 (43m ago) 19h
      kube-system coredns-787d4945fb-ght5s 1/1 Running 2 (43m ago) 19h
      kube-system coredns-787d4945fb-nlx5q 1/1 Running 2 (43m ago) 19h
      kube-system etcd-ubuntu 1/1 Running 1 (43m ago) 19h
      kube-system kube-apiserver-ubuntu 1/1 Running 1 (43m ago) 19h
      kube-system kube-controller-manager-ubuntu 1/1 Running 1 (43m ago) 19h
      kube-system kube-proxy-phdpj 1/1 Running 1 (43m ago) 19h
      kube-system kube-scheduler-ubuntu 1/1 Running 1 (43m ago)

  • @narayan8787
    @narayan8787 9 หลายเดือนก่อน

    Super you are the boss👍

  • @achrafboucetta7215
    @achrafboucetta7215 ปีที่แล้ว

    Thank you very much that's helps me too much !

    • @dhij
      @dhij  ปีที่แล้ว

      Glad it helped!

  • @sureshchandrasahoo4877
    @sureshchandrasahoo4877 11 หลายเดือนก่อน

    You skipped the cgroup driver configuration part and did not tell us about it either. You should cover those parts that you are committing in the video. Anyway, thanks for this video. It is really helpful for setting up a Kubernetes cluster for a bigener.

  • @DeshnaShah-i3k
    @DeshnaShah-i3k 8 หลายเดือนก่อน

    I want to set it up using script, so that I can run it as many times as I need. How to make script from this?

  • @ajayprajapati2453
    @ajayprajapati2453 7 หลายเดือนก่อน

    It helped me to setup the cluster but after installing calico my core dns pods are not coming up . I have changed the pod cidr in calico.yaml. After running kubeadm init all the pods are running except the core dns and then I installed calico but calico node pod itself is not coming up.

    • @dhij
      @dhij  7 หลายเดือนก่อน

      Have you tried `kubectl describe` or `kubectl logs` of the coredns pod to see what it says there?

  • @harshpandey1945
    @harshpandey1945 ปีที่แล้ว

    Awesome tutorial. But somehow my pods running on 2 different nodes can not communicate with each other. The ones which are on the control-plane node can communicate. Am I missing something here? Is calico supposed to be deployed on worker nodes too?

  • @angeldocampo
    @angeldocampo ปีที่แล้ว

    what about intalling metrics server?

  • @ashwinkm3156
    @ashwinkm3156 ปีที่แล้ว

    How do i join another control plane?

  • @amitkumar-sm5kd
    @amitkumar-sm5kd ปีที่แล้ว

    I am getting an error
    Waiting for kubelet to boot up the control plane as static pods from directory etc/kubernetes/manifests. This can take up to 4m0s. Connection refused

    • @Joker3884
      @Joker3884 ปีที่แล้ว

      try to write sudo swapoff -a

  • @shivamanand8998
    @shivamanand8998 ปีที่แล้ว

    What about the opening of ports and disabling swap?

  • @elioscipioni
    @elioscipioni 7 หลายเดือนก่อน

    great video!

  • @leventsezgingenc8568
    @leventsezgingenc8568 ปีที่แล้ว

    Thank you David.

    • @dhij
      @dhij  ปีที่แล้ว

      Glad that helped!

  • @long3850
    @long3850 ปีที่แล้ว

    very helpful !

  • @vejeygandier3454
    @vejeygandier3454 ปีที่แล้ว

    @dhij Great job! I could create a control plane. Do you know how I would create a windows worker node and add it to the control plane? That would be super useful. Looking forward to your tutorial

    • @dhij
      @dhij  ปีที่แล้ว

      Thank you Vejey! Glad that worked. Unfortunately I havent tried, did you have any luck with that?

  • @Kalaiarasan_Balu
    @Kalaiarasan_Balu ปีที่แล้ว

    Hi what about container runtime container d installation?

    • @dhij
      @dhij  ปีที่แล้ว

      Hello, I installed cri-dockerd, which is described at 3:10 mark of the video :)

  • @yourrakesh123
    @yourrakesh123 ปีที่แล้ว

    I followed the exact the same steps while running K8 on Ubuntu 20. I am getting an error while checking the status of kubelet Active: activating (auto-restart). Could you please suggest what might be the issue.

  • @codingnetworks
    @codingnetworks ปีที่แล้ว

    Great Tutorial!! 👏. Just wanted to comment that to the date cri-dockerd installation have improved. In my case i used .deb package to install it.

    • @dhij
      @dhij  ปีที่แล้ว +1

      Ah, thanks for sharing. Glad that helped!

  • @UnchartedWorlds
    @UnchartedWorlds ปีที่แล้ว

    Hi, do we have to repeat the procedure with CRI stuff on worker nodes or is this enough just for the Master node? Thank you for great tutorial, I was stuck with [ERROR CRI]: container runtime is not running error

    • @dhij
      @dhij  ปีที่แล้ว

      Nope I believe you wouldnt need CRI related installation on your worker nodes!

  • @selinoktay8372
    @selinoktay8372 ปีที่แล้ว

    thank you so much, my coredns works now! i'm getting an error for one of the pods (calico-kube-controllers-57b57c56f...). its state seems to oscillate between ErrImagePull and ImagePullBack. I took the same steps as you did and even reset kubeadm. i dont use docker, only containerd. i've tried to pull the image from dockerhub but no use (stuck in infinite loop). any ideas on how this could be solved?

    • @dhij
      @dhij  ปีที่แล้ว +1

      thank you! the ErrImagePull can happen because of many different reasons so its hard to tell. you can try reading the logs and make sure you are pulling the right image with the tag

  • @hemanthdinavahi2020
    @hemanthdinavahi2020 ปีที่แล้ว

    cri-docker.socket failing once I jnitialize the kube using kubeadm init command

  • @HungNguyen-ef4yf
    @HungNguyen-ef4yf ปีที่แล้ว

    Can you help me?
    After i run kubeadm init,
    [error cri] container runtime is not running

    • @dhij
      @dhij  ปีที่แล้ว

      If you are using docker as your container runtime, that really just means that your docker is not running :)

  • @huben92
    @huben92 8 หลายเดือนก่อน

    Thank you sir

  • @suneelkumar5175
    @suneelkumar5175 2 ปีที่แล้ว

    we are facing problem at this step like "Package 'docker-ce' has no installation candidate" can some one explain why I am getting this error.

    • @dhij
      @dhij  2 ปีที่แล้ว

      Which distro are you using? if you are on ubuntu, here is what i found: askubuntu.com/questions/1030179/package-docker-ce-has-no-installation-candidate-in-18-04

    • @suneelkumar5175
      @suneelkumar5175 2 ปีที่แล้ว

      @@dhij Ubuntu 20 in aws

    • @suneelkumar5175
      @suneelkumar5175 2 ปีที่แล้ว

      @@dhij i got this solution but I want to know the reason why it is throwing this error

    • @ziadmohammed5448
      @ziadmohammed5448 2 ปีที่แล้ว

      @@suneelkumar5175 i believe AWS uses there own internal repos check your /etc/apt/sources.list

  • @oumaymalaamiri3146
    @oumaymalaamiri3146 2 ปีที่แล้ว

    great work thanks

    • @dhij
      @dhij  2 ปีที่แล้ว

      thank you!

  • @shivamanand8998
    @shivamanand8998 ปีที่แล้ว

    Hi all, this video works

  • @PiccoloPizza-qb9go
    @PiccoloPizza-qb9go ปีที่แล้ว

    We should do a github gist as a script to merge all of this for plug and play install

  • @MisterDragonn
    @MisterDragonn 11 หลายเดือนก่อน

    Merci pour les travaux

  • @nohandsignal
    @nohandsignal ปีที่แล้ว

    you`ve choosen 192 in inti but you`ve got 10 series in join command how is it possible

    • @dhij
      @dhij  ปีที่แล้ว

      The 192 IP range is the pod network cidr, and it is a provider-specific value as mentioned in the 2nd point here: kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#initializing-your-control-plane-node
      And it is mentioned in the first bullet point here (kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network) that the pod network must not overlap with any of the host networks.
      The 10 IP range is the internal IP address assigned for my VM on Google Cloud. Hope that helps!

  • @leo5946
    @leo5946 ปีที่แล้ว

    is turning off firewall and swap not required ?

    • @dhij
      @dhij  ปีที่แล้ว

      not as far as i know!

  • @nohandsignal
    @nohandsignal ปีที่แล้ว

    legend you are

  • @worldhack.1201
    @worldhack.1201 4 หลายเดือนก่อน

    Very effective

  • @infologiax
    @infologiax 10 หลายเดือนก่อน

    Merci !!

  • @mohamed_akram1
    @mohamed_akram1 3 หลายเดือนก่อน

    Thank you.

  • @cesarcastillo_
    @cesarcastillo_ ปีที่แล้ว

    It doesn't work for me :(

    • @dhij
      @dhij  ปีที่แล้ว

      I might be able to help a little if you let me know what error message you are getting :)

    • @varunchauhan5971
      @varunchauhan5971 ปีที่แล้ว

      @@dhij how do i connect to the pods running on the worker nodes groom browser? The pods are running on private IP 192.*.*.* Something. How do I access them from browser

    • @varunchauhan5971
      @varunchauhan5971 ปีที่แล้ว

      @@dhij how do i connect to the pods running on the worker nodes groom browser? The pods are running on private IP 192.*.*.* Something. How do I access them from browser

  • @AryaKabiri
    @AryaKabiri 3 หลายเดือนก่อน

    thank you

  • @tiagoneves2154
    @tiagoneves2154 ปีที่แล้ว

    Jesus... I need compile a something in GO to install another somethiing...

  • @ilayohana3150
    @ilayohana3150 4 หลายเดือนก่อน

    does anyone really understand all of this

  • @RameshKumar-rt8xb
    @RameshKumar-rt8xb ปีที่แล้ว

    How would I set up working nodes outside of the master network? It's in the same network of the master.

  • @TuncDarbas
    @TuncDarbas ปีที่แล้ว +1

    After mu Cluster join command , I gotta this message below , Any idea =)
    Found multiple CRI endpoints on the host. Please define which one do you wish to use by setting the 'criSocket' field in the kubeadm configuration file: unix:///var/run/containerd/containerd.sock, unix:///var/run/cri-dockerd.sock
    To see the stack trace of this error execute with --v=5 or higher

    • @dhij
      @dhij  ปีที่แล้ว +1

      Yup you can specify the cri-socket with the --cri-socket option. Please refer to 10:08 :)

    • @TuncDarbas
      @TuncDarbas ปีที่แล้ว

      Ok . Today I have pretty much time and I learned logic of kubernetes =) Now I have 1 master +3 worker nodes cluster =) I will try to create 2 scripts ; 1 is for worker nodes. 1 is for master node... Thanks a lot =)

    • @dhij
      @dhij  ปีที่แล้ว +1

      @@TuncDarbas Awesome, good luck!

  • @Csdsds
    @Csdsds ปีที่แล้ว

    I am getting error can you share your email? And help