Update etcd clustering recipe
This commit is contained in:
52
README.md
52
README.md
@@ -61,33 +61,6 @@ Using fish:
|
||||
etcdctl member list
|
||||
```
|
||||
4. In the nixos cluster config, enable clustering for all nodes:
|
||||
```
|
||||
etcdNodes = {};
|
||||
|
||||
features.k8s.etcdCluster = {
|
||||
enable = true;
|
||||
existing = false; # true for master node!
|
||||
nodes = etcdNodes;
|
||||
};
|
||||
```
|
||||
5. Add the next node `kN-1` to the cluster (on the master node):
|
||||
```
|
||||
etcdctl member add kN-1 --peer-urls=https://[ip2]:2380
|
||||
```
|
||||
6. ssh into `kN-1` and run the `etcd-join-cluster` script:
|
||||
```
|
||||
etcd-join-cluster kN-0=https://[ip0]:2380
|
||||
```
|
||||
7. Add the next node `kN-2` to the cluster on the master node `kN-0`:
|
||||
```
|
||||
etcdctl member add kN-2 --peer-urls=https://[ip2]:2380
|
||||
```
|
||||
8. ssh into `kN-2` and run the `etcd-join-cluster` script:
|
||||
```
|
||||
etcd-join-cluster kN-0=https://[ip0]:2380,kN-1=https://[ip1]:2380
|
||||
```
|
||||
9. Zap (ctrl-c) the running etcd:s on `kN-1` and `kN-2`.
|
||||
10. Uncomment etcdNodes and set existing to true for all, and redeploy cluster
|
||||
```
|
||||
etcdNodes = {
|
||||
kN-0 = "https://[ip1]:2380";
|
||||
@@ -95,6 +68,31 @@ Using fish:
|
||||
kN-2 = "https://[ip3]:2380";
|
||||
};
|
||||
|
||||
features.k8s.etcdCluster = {
|
||||
enable = true;
|
||||
existing = false; # true for master node!
|
||||
nodes = {}; # vitally important!
|
||||
};
|
||||
```
|
||||
5. Add the next node `kN-1` to the cluster (on the master node):
|
||||
```
|
||||
etcdctl member add kN-1 --peer-urls=https://[ip2]:2380
|
||||
```
|
||||
6. ssh into `kN-1` and run the `etcd-join-cluster` script:
|
||||
```
|
||||
sudo etcd-join-cluster kN-0=https://[ip0]:2380
|
||||
```
|
||||
7. Add the next node `kN-2` to the cluster on the master node `kN-0`:
|
||||
```
|
||||
etcdctl member add kN-2 --peer-urls=https://[ip2]:2380
|
||||
```
|
||||
8. ssh into `kN-2` and run the `etcd-join-cluster` script:
|
||||
```
|
||||
sudo etcd-join-cluster kN-0=https://[ip0]:2380,kN-1=https://[ip1]:2380
|
||||
```
|
||||
9. Zap (ctrl-c) the running etcd:s on `kN-1` and `kN-2`.
|
||||
10. Uncomment etcdNodes and set existing to true for all, and redeploy cluster
|
||||
```
|
||||
features.k8s.etcdCluster = {
|
||||
enable = true;
|
||||
existing = true;
|
||||
|
||||
2
modules
2
modules
Submodule modules updated: ae6ea2f3bf...6880bb839e
Reference in New Issue
Block a user