#1. Configure Multi-node Kubernetes Cluster on VirtualBox

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024
  • Chapters
    0.00 Introduction
    3:36 Use Case
    6:48 VirtualBox Configuration
    10:32 Install Ubuntu 20.04 VirtualBox
    16:40 K8S Installation and Configuration
    27:28 Joining Worker nodes
    30:05 Testing the setup
    Downloadables:
    VirtualBox - www.virtualbox...
    Ubuntu Server 20.04 LTS - ubuntu.com/dow... (Choose Option 3)
    SSH Client - mobaxterm.moba...
    =========================
    Commands used in the Video:
    =========================
    1.Update the package repository (All hosts)
    sudo apt-get update
    2. Install Docker (All hosts)
    sudo apt-get install docker.io -y
    3. Access Repos via HTTPS (All hosts)
    sudo apt-get install apt-transport-https curl -y
    4. Add K8S key and Repo (All hosts)
    curl -s packages.cloud... | sudo apt-key add -
    cat (ADD 2 "LESS THAN" SIGNS HERE WITHOUT BRACKETS)EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
    deb apt.kubernetes... kubernetes-xenial main
    EOF
    5. Update the package repository and Install K8S components (All hosts):
    sudo apt-get update
    sudo apt-get install -y kubelet=1.18.1-00
    sudo apt-get install -y kubeadm=1.18.1-00
    sudo apt-get install -y kubectl=1.18.1-00
    sudo apt-mark hold kubelet kubeadm kubectl
    6. Add the hosts entry (All hosts)
    edit the file "/etc/hosts"
    7. Disable SWAP (All hosts)
    sudo swapoff -a
    edit /etc/fstab to remove the swap entry
    8. Initiate the Cluster(Only on Master node)
    sudo kubeadm init --control-plane-endpoint kube-master:6443 --pod-network-cidr 10.10.0.0/16
    9. Set the kubectl context auth to connect to the cluster(Only on Master node)
    mkdir -p $HOME/.kube
    sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    sudo chown $(id -u):$(id -g) $HOME/.kube/config
    10. Pod Network Addon(Calico) (Only on Master node)
    Ref: docs.projectca...
    curl docs.projectca... -O
    vi calico.yaml
    11. Generate Token to add worker Node(Only on Master node)
    #Create a new Token
    sudo kubeadm token create
    #List Tokens created
    sudo kubeadm token list
    #Find Certificate Hash on Master
    openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt |
    openssl rsa -pubin -outform der 2(GREATER THAN SYMBOL)/dev/null |
    openssl dgst -sha256 -hex | sed 's/^.* //'
    12. Join Nodes (Only on Worker nodes)
    sudo kubeadm join --token TOKEN_ID CONTROL_PLANE_HOSTNAME:CONTROL_PLANE_PORT --discovery-token-ca-cert-hash sha256:HASH
    (Formed using outputs from step 10, treat CAPS as variables to be replaced)
    13. Want to run workloads on Master?(Only on Master Node)
    kubectl taint nodes -all node-role.kubernetes.io/master
    14. Sample Deployment file:
    =========================
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: nginx-deployment
    labels:
    app: nginx
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: nginx
    template:
    metadata:
    labels:
    app: nginx
    spec:
    containers:
    - name: nginx
    image: nginx
    ports:
    - containerPort: 80
    =========================
    15. Apply the deployment:
    kubectl apply -f FILE_NAME

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

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

    this video is great! I cant wait for including external ip and loadbalancer and ingress controller.
    Keep the great work.

  • @nagendragautam3808
    @nagendragautam3808 9 วันที่ผ่านมา

    Thanks.. This video is very help full for me. struggling lot while setting cluster.

  • @arcanethink
    @arcanethink 5 หลายเดือนก่อน +1

    Thanks a lot for this. Finally what I was trying to find.

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

    This is a very detailed video. The theory would be a very good way to start before going to installations.

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

      Thanks for the suggestion. Will try to maintain that in the next video

    • @dips145
      @dips145 3 ปีที่แล้ว

      Very informative video to start with Kubernetes 👌

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

    loved this! thank you so much

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

    That was really dense, but right to the point. This is the real reliable hands on k8s video I was looking for. Thank you so much!

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

    After a long term of search i could find best one. very informative

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

    Thank you for making this ,finally I was able to create a cluster with your help : )

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

    I researched for a proper guide and you provided it

  • @fatalnywedrowiec1419
    @fatalnywedrowiec1419 3 ปีที่แล้ว

    I asbolutely aprreciate your video. Explained precisely step by step, it helps me a lot to set kubernetes cluster on my PC. You have a flair for teaching.

  • @pinakeshchatterjee
    @pinakeshchatterjee 3 ปีที่แล้ว +4

    That was an informative video 😊
    Thanks for explaining each and every step clearly..
    Waiting for your forthcoming video. 😍

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

    you did wonderful. great work and looking forward for more

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

    Very Professional. Way to go

  • @sfgoncalves
    @sfgoncalves 3 ปีที่แล้ว

    Thanks I have been able to get all of pieces working separately. This helps me tie it all together.... 👍 the notes are great!!!! pgp key is a hyperlink make sure you give it the full qualified name not what your notes have which is not the complete line. It turns it into a link in your notes

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

    Nice explanation

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

    It's really helped me lot. Your instructions are very clear. Many thanks

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

    Very nice and helpful tutorial.. thanks for uploading.☺️

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

    I have created cluster with kubeadm and calico as CNI plugin. Cluster works fine with two nodes(1 master and 1 child ). When i try to attach a new node with cluster it fails to run workload as pods can not communicate with pods running on other worker node.

  • @wenupix.
    @wenupix. 2 ปีที่แล้ว

    This video helped me alot. Is simple but very precise and well explained: all very clear. Thanks.

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

    Nice one and informative . Cheers !!!

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

    Waiting for your next videos

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

    Awesome video bro. Keep up the good work.

  • @kannanpartha9908
    @kannanpartha9908 3 ปีที่แล้ว

    Awesome Video - Best presentation. you covered very clearly.

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

    Thanks for the tuto, mate. Bless u

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

    Awesome Lab.

  • @prachitrivedi2028
    @prachitrivedi2028 3 ปีที่แล้ว

    The video is too good. It is very informative. Please make more videos of this kind...I am eager to watch them. Waiting for you upcoming videos..

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

      Thank you, I have plans to post more!!

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

      @@2dpointtechie411 All the best. Can you create video on multi service hosting in AKS using app gateway?

  • @abhishekpanda5697
    @abhishekpanda5697 3 ปีที่แล้ว

    I'm waiting for upcoming tutorial. Just Awesome.

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

    perfect, helpful, thanks!

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

    hello i am triyng to do the same here but i an on mac silicon so i can't use virtual box and i have to use UTM instead.. can u make a similar video or give me suggestion on how to it with this software?

  • @user-gc8if2vv9v
    @user-gc8if2vv9v 7 หลายเดือนก่อน

    Hi Sir,
    Im getting error while applying calico.yaml file
    error: resource mapping not found for name: "calico-kube-controllers" namespace: "kube-system" from "calico.yaml": no matches for kind "PodDisruptionBudget" in version "policy/v1"
    ensure CRDs are installed first
    Please help me on this error.

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

    very helpful! i like 🍻

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

    gpg: no valid OpenPGP data found. this error is coming any suggestions in 4 th step

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

    Brilliant. Thank you

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

    pls try to add create application eg: DB to access and roll out. what will happpen in realtime enviroment eg; DC cluster,

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

    It would have been best suit if could explore HDP 3 setup along with

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

    very good video & good knowledge, thank u.

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

    thanks for your nice video ...I tried the same way to create a multi-node in Oracle VB.. but I am unable to see NAT ip in the node I used Centos 8.5...I can see only one IP ..Oracle VB version: 7

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

    Good Article, But as of now every thing is changed if you can share the calico.yaml file will be better for us to check if every this works as in this video.

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

    in my machine NAT interface is not picking IP itself how to fix it ?

  • @DaGreatSandi
    @DaGreatSandi 3 ปีที่แล้ว

    Waiting for your next video

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

    Good tutorial! when the router got rebooted I was not able to putty the static IP defined in /etc/network/interface, and ifconfig did not show ip address but the link was up
    The NAT IP works fine and install packages on Ubuntu 20.
    any advice?

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

      you can login to the VM console to see what's wrong or assign a new IP if it's conflicting

  • @rsvasanth
    @rsvasanth 3 ปีที่แล้ว

    Very well explained

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

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

    Static IP set only for master? why not to worker-node-1? please clarify?

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

    2DPointTechie
    while running kubectl get nodes facing this below issue, some time it runs fine
    The connection to the server master:6443 was refused - did you specify the right host or port?

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

    Hi, It is very helpful to configure our own cluster setup. While I configure, I have got below error. will you check and reply?
    The connection to the server localhost:8080 was refused -

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

    Do I have to use 4 cpus? Can I just use 2

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

    would you share me NAT hortonworlks download link ?

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

    Thanks Bhai but I need to use containerd as run time

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

    More videos please...

  • @Goodwinisback
    @Goodwinisback 3 ปีที่แล้ว

    I started all 3 (1 master and 2 workers) VM, but don't know why all of them got same IP address.
    Is ther any way to change it?

  • @EnglishEveryday
    @EnglishEveryday 3 ปีที่แล้ว

    Thank you so much...

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

    unable to install kubelet:
    sudo apt-get install -y kubelet=1.18.1-00
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    No apt package "kubelet", but there is a snap with that name.
    Try "snap install kubelet"
    E: Unable to locate package kubelet

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

      Did you try this before installation? Also try apt-get update after that and then try installing
      curl -s packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
      cat

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

    bro can i get your doc i need the architecure of the cluster

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

    Command #4 is different from the video

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

    Is there any way we can get an public IP of the master node?

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

      Actually, when we talk about public IP, we depend on any cloud platform. Once you expose the service, it's exported as load balancer having public ip

    • @AVISHEKDASABSTRACT
      @AVISHEKDASABSTRACT 3 ปีที่แล้ว

      @@2dpointtechie411 yes that we can do. We can Create a LB service and expose its external IP. But I need it because I have installed Harbor using helm on aks cluster. But not able find the public IP.

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

      How about this
      docs.microsoft.com/en-us/azure/aks/load-balancer-standard

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

    Hi, Very interesting tutorial. I setup my cluster using this video. Now how to integrate load testing tool, locust with this Kubernetes cluster?

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

      May be this might help:
      medium.com/locust-io-experiments/locust-io-experiments-running-in-kubernetes-95447571a550

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

      @@2dpointtechie411 how we can change locust master& slave deployment to our pervious multinode kubernetes cluster? Can you please guide. Thnaks in advance

  • @yoin1000
    @yoin1000 3 ปีที่แล้ว

    awesome. Does anyone know any detailed guide to create locally a cluster in kubernetes with microservices?
    For example, a cluster oriented to e-commerce. I would pay for such a guide.

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

      There's no specific guide because it depends on the use case of the e-commerce application. What's your use case?

    • @yoin1000
      @yoin1000 3 ปีที่แล้ว

      @@2dpointtechie411 thanks for answering!
      it's actually a free project that I have to do. my idea was to install a LAMP with wordpress in kubernetes, and then have a copy control, monitoring, high availability, scaling. I am not very clear about it, but I do not care much about the services, it is rather to learn from scratch to the end, in an orderly way, to see the whole process. What services or applications is the least of it.

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

      I think this is your first agenda:
      kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/

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

    sudo vim /etc/network/interfaces

  • @rwahowa
    @rwahowa 10 วันที่ผ่านมา

    How to Install Kubeadm cluster on a Laptop using VirtualBox 7 : th-cam.com/video/W3337KFn5I0/w-d-xo.html

  • @louisaime4490
    @louisaime4490 3 ปีที่แล้ว

    Thank you Sir ,
    Could you share your mail id .
    Thanks

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

    watch -n2 'kubectl get pods -A'