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

Weave 2.0.1 is supported by kubespray

email's avatar
email committed
Weave be use with [**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

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

* For use Weave encryption, it's necessary to specify password (if no password specify, no encrytion)

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

email's avatar
email committed
This password is use in environment variable in weave container. So it's impossible to see it somewhere

email's avatar
email committed
Weave is deploy by kubernetes with 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
# On k8s master
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 ...)
email's avatar
email committed

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

email's avatar
email committed
* Check parameters of weave

```
# On node
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 to fixed cluster

### Seed mode
email's avatar
email committed

email's avatar
email committed
This mode is to dynamic cluster
email's avatar
email committed

the seed mode allows multi clouds simultaneously and also hybrid on premise/cloud clusters
email's avatar
email committed

* Change consensus mode to seed mode

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
This two variables are use to have automaticaly dynamic cluster (**/!\ 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`, allows to save the first or firsts nodes of the weave network

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

email's avatar
email committed
these two variables allows to connecte a new node to the weave network. this new node need to know the first node (seed) and list of IP to all node of network
email's avatar
email committed

For reset these variables set there values to `uninitialized`