Use kubeadm to create a cluster. Deploy Pod Network – Flannel

Tram Ho

Use kubeadm to create the cluster

First of all there are some articles that use minikube, so why don’t I use minikube . In this series, I have server production environment, not learning, local environment.

First we will initialize the master node with kubeadm

Master Node

Next we will run the following command, follow the recommend of kubeadm init

At worker Node

Follow the last line command after kubeadm init we go to the copy worker nodes and run the same command below.

Master Node

run the following command

Result:

Deploy Pod Network – Flannel

So what are pods and what are pod networks?

See also https://medium.com/google-cloud/understanding-kubernetes-networking-pods-7117dd28727

So what is flannel?

See also https://kubernetes.io/docs/concepts/cluster-administration/networking/#flannel

For flannel to work properly, you must run kubeadm init –pod-network-cidr = 10.244.0.0 / 16 beforehand.

Run sysctl net.bridge.bridge-nf-call-iptables = 1 to transfer bridged IPv4 traffic to the iptables chain. This is a requirement for some CNI plugins to work, for more information please see here and here

Result:

Next

We will deploy, create the easiest application service nginx earth

facebook: facebook.com/quanghung997

Share the news now

Source : Viblo