Requirements:-
1. Install Docker (any container)
2. RAM minimum 2GB for each node
Set up :-
For installation of docker , please follow this link
for
After docker installation
a.
{
"exec-opts
"log-driver
"log-opts": {
"max-size
},
"storage-driver
}
copy this block to daemon
b.
c.
d.
please follow the steps to install kubernetes master
1. sudo apt-get update
2. sudo apt-get upgrade -y
3. sudo apt-get install apt-transport-https -y
install docker before you hitting these command ,
4. sudo systemctl start docker
5. sudo systemctl enable docker
6. sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
copy the belowurl ,
deb http://apt.kubernetes.io/kubernetes -xenial main
7.sudo vi /etc/apt /sources. list. d /kubernetes . list
copy the below
deb http://apt.kubernetes.io/
7.
and paste it here .
8. sudo apt-get update
I am using
9. sudo apt-get install -q kubelet=1.16.3-00 kubeadm=1.16.3-00 kubectl=1.16.3-00 kubernetes-cni
While initializing, if you received swap related errors as showed below.
[ERROR Swap]: running with swap on is not supported . Please disable swap
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=..
for disable swap type
#swapoff -a
#
or you can type command ignoring swap.
then start the
then start the kubernetes master ,
sudo kubeadm init -- pod-network-cidr 10.244.0.0/16
-- apiserver-advertise-address=<masternode ip>
-- ignore-preflight-errors=swap
After executing , you ll see this page .
11.1 mkdir -p $HOME/. kube
11.2 sudo cp -i /etc/kubernetes/admin. conf $HOME/. kube/config
11.3 sudo chown $( id -u): $( id -g) $HOME/. kube/config
IMP --:
For Flannel :
For Calicio :
I am using flannel ,
ForKubernetes v1.7+
For
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
After all pods created and running
For Node Set up
Follow the steps 1 to 9 ,then type the join command you are getting in your master node ,
then type
It will take sometimes to status become Ready .
Install specific Version -:
Get all the version :-
to install specific version :-
sudo apt-get install -q kubelet=<version> kubeadm=<version> kubectl=<version> kubernetes-cni=<version>
sudo apt-get install -q kubelet=<version> kubeadm=<version> kubectl=<version> kubernetes-cni=<version>
For K8S dashborad installation please follow this link below
Uninstall K8s Completely -:
sudo kubeadm reset
sudo apt-get purge kubeadm kubectl kubelet kubernetes-cni kube*
sudo apt-get autoremove
sudo rm -rf ~/.kube
sudo apt-get autoremove
sudo rm -rf ~/.kube
This comment has been removed by the author.
ReplyDeleteExcellent article.Thanks for sharing....
ReplyDeleteDocker Training in Hyderabad
thanks for sharing your post
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course | Full Stack Training in Bangalore | Certification | Online Training Course | Full Stack Training in Hyderabad | Certification | Online Training Course | Full Stack Training in Pune | Certification | Online Training Course | Full Stack Training | Certification | Full Stack Online Training Course
Nice and good article.Thanks for sharing this wonderful content.its very useful to us.I gained many unknown information, the way you have clearly explained is really fantastic.
ReplyDeleteDevOps Training in Chennai
DevOps Online Training in Chennai
DevOps Training in Bangalore
DevOps Training in Hyderabad
DevOps Training in Coimbatore
DevOps Training
DevOps Online Training