#1. Configure Multi-node Kubernetes Cluster on VirtualBox

  Рет қаралды 32,490

2DPointTechie

2DPointTechie

3 жыл бұрын

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.org/wiki/Downl...
Ubuntu Server 20.04 LTS - ubuntu.com/download/server (Choose Option 3)
SSH Client - mobaxterm.mobatek.net/downloa...
=========================
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.google.com/apt... | 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.io/ 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.projectcalico.org/gettin...
curl docs.projectcalico.org/manife... -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

Пікірлер: 81
@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!
@joaomarcosmaretocalado
@joaomarcosmaretocalado 3 жыл бұрын
this video is great! I cant wait for including external ip and loadbalancer and ingress controller. Keep the great work.
@pinakeshchatterjee
@pinakeshchatterjee 3 жыл бұрын
That was an informative video 😊 Thanks for explaining each and every step clearly.. Waiting for your forthcoming video. 😍
@TimepassUtube2009
@TimepassUtube2009 Жыл бұрын
Thank you for making this ,finally I was able to create a cluster with your help : )
@detectiveserene
@detectiveserene 2 жыл бұрын
you did wonderful. great work and looking forward for more
@jaikrishnansathish2156
@jaikrishnansathish2156 3 жыл бұрын
It's really helped me lot. Your instructions are very clear. Many thanks
@fatalnywedrowiec1419
@fatalnywedrowiec1419 2 жыл бұрын
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.
@2dpointtechie411
@2dpointtechie411 2 жыл бұрын
Glad it helped!
@wenupix.
@wenupix. 2 жыл бұрын
This video helped me alot. Is simple but very precise and well explained: all very clear. Thanks.
@sayandeepray6841
@sayandeepray6841 3 жыл бұрын
Very nice and helpful tutorial.. thanks for uploading.☺️
@nizarworld2020
@nizarworld2020 Жыл бұрын
After a long term of search i could find best one. very informative
@arcanethink
@arcanethink 4 ай бұрын
Thanks a lot for this. Finally what I was trying to find.
@ravigovindhan3018
@ravigovindhan3018 3 жыл бұрын
Nice one and informative . Cheers !!!
@niveyshak
@niveyshak 3 жыл бұрын
Very Professional. Way to go
@ZeroBAT2008
@ZeroBAT2008 2 жыл бұрын
Awesome video bro. Keep up the good work.
@cloudpillsdaily
@cloudpillsdaily Ай бұрын
loved this! thank you so much
@lahiripratip
@lahiripratip 3 жыл бұрын
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 👌
@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
@2dpointtechie411
@2dpointtechie411 2 жыл бұрын
Glad it helped!
@kannanpartha9908
@kannanpartha9908 2 жыл бұрын
Awesome Video - Best presentation. you covered very clearly.
@2dpointtechie411
@2dpointtechie411 2 жыл бұрын
Glad you liked it!
@jeffdoka1044
@jeffdoka1044 3 ай бұрын
I researched for a proper guide and you provided it
@abhishekpanda5697
@abhishekpanda5697 3 жыл бұрын
I'm waiting for upcoming tutorial. Just Awesome.
@2dpointtechie411
@2dpointtechie411 2 жыл бұрын
Done. Please check the updated playlist
@bbitsasm5134
@bbitsasm5134 3 жыл бұрын
Waiting for your next videos
@TomaHawk00HouseMusic
@TomaHawk00HouseMusic 2 жыл бұрын
Thanks for the tuto, mate. Bless u
@emanasa
@emanasa 2 жыл бұрын
very good video & good knowledge, thank u.
@davidjhons2549
@davidjhons2549 13 күн бұрын
Nice explanation
@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 жыл бұрын
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?
@atulk1335
@atulk1335 3 жыл бұрын
perfect, helpful, thanks!
@codingclips63
@codingclips63 Ай бұрын
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.
@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?
@DaGreatSandi
@DaGreatSandi 3 жыл бұрын
Waiting for your next video
@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?
@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?
@AwargiforSirTarar
@AwargiforSirTarar Жыл бұрын
Awesome Lab.
@Abubakran
@Abubakran 2 жыл бұрын
Brilliant. Thank you
@giluy87
@giluy87 5 ай бұрын
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?
@mukeshdhiman81
@mukeshdhiman81 Жыл бұрын
in my machine NAT interface is not picking IP itself how to fix it ?
@saigandham7742
@saigandham7742 2 жыл бұрын
gpg: no valid OpenPGP data found. this error is coming any suggestions in 4 th step
@R_Mahesh5
@R_Mahesh5 Жыл бұрын
Static IP set only for master? why not to worker-node-1? please clarify?
@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
@aleksandrkravtsov8727
@aleksandrkravtsov8727 2 жыл бұрын
very helpful! i like 🍻
@djbuffonage9500
@djbuffonage9500 10 ай бұрын
Do I have to use 4 cpus? Can I just use 2
@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 -
@user-gc8if2vv9v
@user-gc8if2vv9v 6 ай бұрын
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.
@triaaalaeddine8722
@triaaalaeddine8722 2 жыл бұрын
bro can i get your doc i need the architecure of the cluster
@nizarworld2020
@nizarworld2020 Жыл бұрын
would you share me NAT hortonworlks download link ?
@rsvasanth
@rsvasanth 3 жыл бұрын
Very well explained
@2dpointtechie411
@2dpointtechie411 2 жыл бұрын
Keep watching
@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
@ubayabdelgadir4165
@ubayabdelgadir4165 2 жыл бұрын
Command #4 is different from the video
@ashraf9902
@ashraf9902 3 жыл бұрын
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
@EnglishEveryday
@EnglishEveryday 3 жыл бұрын
Thank you so much...
@2dpointtechie411
@2dpointtechie411 2 жыл бұрын
Welcome!
@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.
@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/
@AVISHEKDASABSTRACT
@AVISHEKDASABSTRACT 3 жыл бұрын
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
@sunilchandra7858
@sunilchandra7858 2 жыл бұрын
sudo vim /etc/network/interfaces
@dips145
@dips145 3 жыл бұрын
More videos please...
@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 жыл бұрын
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
@devinodevino6696
@devinodevino6696 3 жыл бұрын
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 жыл бұрын
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
@chandrasekhar5858
@chandrasekhar5858 9 ай бұрын
Thanks Bhai but I need to use containerd as run time
@chandrasekhar5858
@chandrasekhar5858 9 ай бұрын
Please suggest me
@louisaime4490
@louisaime4490 2 жыл бұрын
Thank you Sir , Could you share your mail id . Thanks
@sunilchandra7858
@sunilchandra7858 2 жыл бұрын
watch -n2 'kubectl get pods -A'
Setup Kubernetes Cluster Using Kubeadm [Multi-node]
16:21
DevopsCube
Рет қаралды 27 М.
#2. Docker Basics with Hands-On POC
40:07
2DPointTechie
Рет қаралды 1,3 М.
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 31 МЛН
Easy Kubernetes Using Ansible! (RKE2)
41:12
Jim's Garage
Рет қаралды 6 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 252 М.
What's on my Home Server?? MUST HAVE Services 2023!
27:29
TechHut
Рет қаралды 718 М.
Best practices for Calico installation
20:20
CNCF [Cloud Native Computing Foundation]
Рет қаралды 6 М.
[ Kube 1.3 ] Set up multi master Kubernetes cluster using Kubeadm
20:56
Just me and Opensource
Рет қаралды 34 М.
САМЫЙ ДОРОГОЙ ЧЕХОЛ! В стиле Mac Pro
0:35
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 905 М.
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 851 М.
Копия iPhone с WildBerries
1:00
Wylsacom
Рет қаралды 485 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,1 МЛН