provisioning pod networking

install cni plugins on each worker node

# get cni plugin
> wget \
  https://github.com/containernetworking/plugins/releases/download/v0.7.5/cni-plugins-amd64-v0.7.5.tgz

# extract plugin
> sudo tar -xzvf cni-plugins-amd64-v0.7.5.tgz \
  --directory /opt/cni/bin/

deploy weave network

on master

> kubectl apply -f \
  "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
  ---
  serviceaccount/weave-net created
  clusterrole.rbac.authorization.k8s.io/weave-net created
  clusterrolebinding.rbac.authorization.k8s.io/weave-net created
  role.rbac.authorization.k8s.io/weave-net created
  rolebinding.rbac.authorization.k8s.io/weave-net created
  daemonset.apps/weave-net created

weave uses pod cidr 10.32.0.0/12 by default

verify

> kubectl get pods -n kube-system
  ---
  NAME              READY   STATUS    RESTARTS   AGE
  weave-net-9spr9   2/2     Running   1          67m
  weave-net-tztkz   2/2     Running   1          67m

output should be “READY 2/2” - something is wrong - maybe the missing scheduler


— copyleft —

all commands shown on this page are from mmumshad’s fork of “kubernetes-the-hard-way” by kelseyhightower on github