2019-03-20 07:34:49 +03:00
|
|
|
# Provisioning Pod Network
|
|
|
|
|
|
|
|
We chose to use CNI - [weave](https://www.weave.works/docs/net/latest/kubernetes/kube-addon/) as our networking option.
|
|
|
|
|
2019-03-20 11:48:31 +03:00
|
|
|
### Install CNI plugins
|
|
|
|
|
2019-03-20 07:34:49 +03:00
|
|
|
Download the CNI Plugins required for weave on each of the worker nodes - `worker-1` and `worker-2`
|
2019-03-20 11:48:31 +03:00
|
|
|
|
2019-03-20 07:34:49 +03:00
|
|
|
`wget https://github.com/containernetworking/plugins/releases/download/v0.7.5/cni-plugins-amd64-v0.7.5.tgz`
|
|
|
|
|
|
|
|
Extract it to /opt/cni/bin directory
|
2019-03-20 11:48:31 +03:00
|
|
|
|
2019-03-20 11:49:09 +03:00
|
|
|
`sudo tar -xzvf cni-plugins-amd64-v0.7.5.tgz --directory /opt/cni/bin/`
|
2019-03-20 07:34:49 +03:00
|
|
|
|
2019-03-20 11:48:31 +03:00
|
|
|
### Deploy Weave Network
|
2019-03-20 07:34:49 +03:00
|
|
|
|
|
|
|
Deploy weave network. Run only once on the `master` node.
|
2019-03-20 11:49:48 +03:00
|
|
|
|
|
|
|
|
2019-03-20 07:34:49 +03:00
|
|
|
`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
|
|
|
|
|
|
|
|
```
|
2019-03-20 12:20:28 +03:00
|
|
|
NAME READY STATUS RESTARTS AGE
|
|
|
|
weave-net-58j2j 2/2 Running 0 89s
|
|
|
|
weave-net-rr5dk 2/2 Running 0 89s
|
2019-03-20 07:34:49 +03:00
|
|
|
```
|