Skip to content
weave.md 1.87 KiB
Newer Older
email's avatar
email committed
Weave
=======

Weave 2.0.1 is supported by kubespray

email's avatar
email committed
Weave uses [**consensus**](https://www.weave.works/docs/net/latest/ipam/#initialization) mode (default mode) and [**seed**](https://www.weave.works/docs/net/latest/ipam/#initialization) mode.
email's avatar
email committed

email's avatar
email committed
Weave encryption is supported for all communication
email's avatar
email committed

email's avatar
email committed
* To use Weave encryption, specify a strong password (if no password, no encrytion)
email's avatar
email committed

email's avatar
email committed
```
# In file ./inventory/group_vars/k8s-cluster.yml
weave_password: EnterPasswordHere
```

email's avatar
email committed
This password is used to set an environment variable inside weave container.
email's avatar
email committed

email's avatar
email committed
Weave is deployed by kubespray using daemonSet
email's avatar
email committed

email's avatar
email committed
* Check the status of Weave containers
email's avatar
email committed

email's avatar
email committed
```
email's avatar
email committed
# From client
email's avatar
email committed
kubectl -n kube-system get pods | grep weave
```
email's avatar
email committed

email's avatar
email committed
* Check status of weave (connection,encryption ...) for each node
email's avatar
email committed

email's avatar
email committed
```
email's avatar
email committed
# On nodes
email's avatar
email committed
curl http://127.0.0.1:6784/status
```

email's avatar
email committed
* Check parameters of weave for each node
email's avatar
email committed

```
email's avatar
email committed
# On nodes
email's avatar
email committed
ps -aux | grep weaver
```

email's avatar
email committed
### Consensus mode (default mode)
email's avatar
email committed

email's avatar
email committed
This mode is best to use on static size cluster
email's avatar
email committed

### Seed mode
email's avatar
email committed

email's avatar
email committed
This mode is best to use on dynamic size cluster
email's avatar
email committed

email's avatar
email committed
The seed mode also allows multi-clouds and hybrid on-premise/cloud clusters deployement.
email's avatar
email committed

email's avatar
email committed
* Switch from consensus mode to seed mode
email's avatar
email committed

email's avatar
email committed
```
# In file ./inventory/group_vars/k8s-cluster.yml
weave_mode_seed: true
```
email's avatar
email committed

email's avatar
email committed
These two variables are only used when `weave_mode_seed` is set to `true` (**/!\ do not manually change these values**)
email's avatar
email committed

email's avatar
email committed
```
# In file ./inventory/group_vars/k8s-cluster.yml
weave_seed: uninitialized
weave_peers: uninitialized
email's avatar
email committed
```

email's avatar
email committed
The first variable, `weave_seed`, saves the firsts nodes of the weave network
email's avatar
email committed

email's avatar
email committed
The seconde variable, `weave_peers`, saves IP of all nodes of the weave network
email's avatar
email committed

email's avatar
email committed
These two variables are used to connect a new node to the weave network. The new node needs to know the firsts nodes (seed) and the list of IPs of all nodes.
email's avatar
email committed

email's avatar
email committed
To reset these variables and reset the weave network set them to `uninitialized`