Kubernetes in the most powerfull container orchestration engine
Its free for everyone
- Developed by Google and CNCF
- 7 June 2014 is the Release date
- written in Go lang
[root@master ~]# setenforce 0
[root@master ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
[root@master ~]# modprobe br_netfilter
[root@master ~]# echo '1' > /proc/sys/net/bridge/bridge-nf-call-iptables
[root@master ~]# swapoff -a
[root@master ~]# yum install docker kubeadm -y
you can browse this link kubernetes repo
cat <<EOF >/etc/yum.repos.d/kube.repo
[kube]
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
gpgcheck=0
EOF
cat <<X >/etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
X
[root@master ~]# systemctl enable --now docker kubelet
We are here using Calico Networking, so we need to pass some parameter
you can start Kubernetes_networking from this
[root@master ~]# kubeadm init --pod-network-cidr=192.168.0.0/16
[root@master ~]# kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address=0.0.0.0 --apiserver-cert-extra-sans=publicip,privateip,serviceip
[root@master ~]# kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address=0.0.0.0 --apiserver-cert-extra-sans=publicip,privateip,serviceip --control-plane-endpoint=publicIP
[root@master ~]# mkdir -p $HOME/.kube
[root@master ~]# cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
[root@master ~]# chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://docs.projectcalico.org/v3.8/manifests/calico.yaml
wget https://docs.projectcalico.org/manifests/calico.yaml
kubectl apply -f calico.yaml
minikube start --network-plugin=cni --cni=calico
minikube node add
After this all nodes will be in ready state
[root@master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master.example.com Ready master 11m v1.12.2
node1.example.com Ready <none> 9m51s v1.12.2
node2.example.com Ready <none> 9m25s v1.12.2
node3.example.com Ready <none> 9m3s v1.12.2
Good luck guys !!