#1. Configure Multi-node Kubernetes Cluster on VirtualBox

Поделиться
HTML-код
  • Опубликовано: 8 сен 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 22 дня назад

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

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

  • @arcanethink
    @arcanethink 6 месяцев назад +1

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

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

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

    loved this! thank you so much

  • @pinakeshchatterjee
    @pinakeshchatterjee 3 года назад +4

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

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

    I researched for a proper guide and you provided it

  • @sayandeepray6841
    @sayandeepray6841 3 года назад +2

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

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

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

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

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

  • @jaikrishnansathish2156
    @jaikrishnansathish2156 3 года назад +1

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

  • @niveyshak
    @niveyshak 3 года назад +1

    Very Professional. Way to go

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

    you did wonderful. great work and looking forward for more

  • @bbitsasm5134
    @bbitsasm5134 3 года назад +1

    Waiting for your next videos

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

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

  • @davidjhons2549
    @davidjhons2549 2 месяца назад

    Nice explanation

  • @abhishekpanda5697
    @abhishekpanda5697 3 года назад

    I'm waiting for upcoming tutorial. Just Awesome.

  • @kannanpartha9908
    @kannanpartha9908 3 года назад

    Awesome Video - Best presentation. you covered very clearly.

  • @atulk1335
    @atulk1335 3 года назад +1

    perfect, helpful, thanks!

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

    Thanks for the tuto, mate. Bless u

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

    very good video & good knowledge, thank u.

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

    Brilliant. Thank you

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

    Awesome video bro. Keep up the good work.

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

    Awesome Lab.

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

    very helpful! i like 🍻

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

    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.

  • @rsvasanth
    @rsvasanth 3 года назад

    Very well explained

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

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

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

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

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

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

  • @dips145
    @dips145 3 года назад +1

    More videos please...

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

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

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

  • @EnglishEveryday
    @EnglishEveryday 3 года назад

    Thank you so much...

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

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

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

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

    Thanks Bhai but I need to use containerd as run time

  • @rwahowa
    @rwahowa 23 дня назад

    How to Install Kubeadm cluster on a Laptop using VirtualBox 7 : ruclips.net/video/W3337KFn5I0/видео.html

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

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

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

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

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

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

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

    would you share me NAT hortonworlks download link ?

  • @iqrazafar8738
    @iqrazafar8738 3 года назад

    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

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

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

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

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

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

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

    Command #4 is different from the video

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

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

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

    sudo vim /etc/network/interfaces

  • @louisaime4490
    @louisaime4490 3 года назад

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

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

    watch -n2 'kubectl get pods -A'

  • @DaGreatSandi
    @DaGreatSandi 3 года назад

    Waiting for your next video