Skip to content

Latest commit

 

History

History
44 lines (25 loc) · 1.34 KB

12-configure-pod-networking.md

File metadata and controls

44 lines (25 loc) · 1.34 KB

Provisioning Pod Network

We chose to use CNI - weave as our networking option.

Install CNI plugins

Download the CNI Plugins required for weave on each of the worker nodes - worker-1 and worker-2

wget https://github.com/containernetworking/plugins/releases/download/v0.8.5/cni-plugins-linux-amd64-v0.8.5.tgz

Extract it to /opt/cni/bin directory

sudo tar -xzvf cni-plugins-amd64-v0.7.5.tgz --directory /opt/cni/bin/

Reference: https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#cni

Deploy Weave Network

Deploy weave network. Run only once on the master node.

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

Weave uses POD CIDR of 10.32.0.0/12 by default.

Verification

List the registered Kubernetes nodes from the master node:

master-1$ kubectl get pods -n kube-system

output

NAME              READY   STATUS    RESTARTS   AGE
weave-net-58j2j   2/2     Running   0          89s
weave-net-rr5dk   2/2     Running   0          89s

Reference: https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/weave-network-policy/#install-the-weave-net-addon

Next: Kube API Server to Kubelet Connectivity