c12s-kubespray/docs/weave.md

73 lines
1.9 KiB
Markdown
Raw Normal View History

2017-07-27 12:40:52 +00:00
Weave
=======
Weave 2.0.1 is supported by kubespray
2017-07-27 13:10:08 +00:00
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
2017-07-27 12:40:52 +00:00
In kubespray, Weave encryption for all communication is supported
2017-07-28 09:33:13 +00:00
* For use Weave encryption, it's necessary to specify password (if no password specify, no encrytion)
2017-07-27 12:40:52 +00:00
```
# In file ./inventory/group_vars/k8s-cluster.yml
weave_password: EnterPasswordHere
```
2017-07-28 09:33:13 +00:00
This password is use in environment variable in weave container. So it's impossible to see it somewhere
2017-07-27 12:40:52 +00:00
Weave is deploy by kubernetes with daemonSet
2017-07-28 09:33:13 +00:00
2017-07-27 12:40:52 +00:00
* Check the status of Weave containers
2017-07-28 09:33:13 +00:00
2017-07-27 12:40:52 +00:00
```
2017-07-28 09:33:13 +00:00
# On k8s master
2017-07-27 12:40:52 +00:00
kubectl -n kube-system get pods | grep weave
```
2017-07-28 09:33:13 +00:00
2017-07-27 12:40:52 +00:00
* Check status of weave (connection,encryption ...)
2017-07-28 09:33:13 +00:00
2017-07-27 12:40:52 +00:00
```
2017-07-28 09:33:13 +00:00
# On node
2017-07-27 12:40:52 +00:00
curl http://127.0.0.1:6784/status
```
2017-07-28 09:33:13 +00:00
* Check parameters of weave
```
# On node
ps -aux | grep weaver
```
2017-07-27 12:40:52 +00:00
### Consensus mode (default mode)
2017-07-28 09:33:13 +00:00
2017-07-27 12:40:52 +00:00
This mode is to fixed cluster
### Seed mode
2017-07-28 09:33:13 +00:00
2017-07-27 12:40:52 +00:00
This mode is to dynamic cluster
2017-07-27 15:00:54 +00:00
the seed mode allows multi clouds simultaneously and also hybrid on premise/cloud clusters
2017-07-28 09:33:13 +00:00
* Change consensus mode to seed mode
2017-07-27 12:40:52 +00:00
```
# In file ./inventory/group_vars/k8s-cluster.yml
weave_mode_seed: true
```
2017-07-28 09:33:13 +00:00
2017-07-27 15:00:54 +00:00
This two variables are use to have automaticaly dynamic cluster (**/!\ do not manually change these values**)
2017-07-28 09:33:13 +00:00
2017-07-27 12:40:52 +00:00
```
# In file ./inventory/group_vars/k8s-cluster.yml
weave_seed: uninitialized
weave_peers: uninitialized
2017-07-27 15:00:54 +00:00
```
2017-07-28 09:33:13 +00:00
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
2017-07-27 15:00:54 +00:00
2017-07-28 09:33:13 +00:00
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
2017-07-27 15:00:54 +00:00
For reset these variables set there values to `uninitialized`