...
1# Node Offline, Replacement, Deletion
2
3This guide is helpful for kubernetes node offline testing.
4
5## Create a kubernetes cluster with a control-plane and 2 lanes
6
7```shell
8k3d registry create k3d.localhost --port 21700
9
10# We can associate our local registry node in case you need it later
11k3d cluster create ien-0 --registry-use k3d-k3d.localhost:21700 \
12 --k3s-node-label "node.ncr.com/class=server@server:0" \
13 --k3s-node-label "node.ncr.com/lane=0@server:0" \
14 --k3s-node-label "node.ncr.com/role=control-plane@server:0" \
15 --k3s-node-label "node.ncr.com/hostname=ien-0@server:0" \
16
17k3d node create -c ien-0 ien-1 --k3s-node-label node.ncr.com/class=touchpoint,node.ncr.com/lane=1,node.ncr.com/role=worker,node.ncr.com/hostname=ien-1
18k3d node create -c ien-0 ien-2 --k3s-node-label node.ncr.com/class=touchpoint,node.ncr.com/lane=2,node.ncr.com/role=worker,node.ncr.com/hostname=ien-2
19```
20
21## Connect it to Edge
22
23> You may need to suspend some pallets as currently not all DSDS pieces work.
24
25```shell
26edge beta connect \
27 --banner=mailmen \
28 --organization=edge-dev1-retail-b526aa \
29 --store=<store-name> \
30 --kubeconfig=$HOME/.kube/config \
31 --kubeconfig-context=k3d-ien-0 \
32 --cluster-type=dsds \
33 --api-endpoint=https://dev1.edge-preprod.dev/api/v2 \
34 --username=<username> \
35 --password=<password>
36```
37
38## CouchDB Image issue
39There is an issue where for some reason, couchdb hosted on our repositories does not run on kind or k3d cluster.
40
41```shell
42kubectl patch UnpackedPallet -p '{"spec": {"suspend": true}}' --type=merge couchdb-<store-name>
43```
44
45* Replace couchdb image tag with `couchdb:3.3.1` in CouchDB StatefulSet Persistence
46
47## Taking a node offline
48
49```shell
50# example taking the 2nd touchpoint offline
51docker network disconnect k3d-ien k3d-ien-2-0
52```
53
54## Taking a node offline
55
56```shell
57# example taking the 2nd touchpoint offline
58docker network disconnect k3d-ien k3d-ien-2-0
59```
60
61## Node Replacement
62There is document on to perform graceful node replacement [here](https://docs.edge-infra.dev/edge/sds/nodereinstallation/).
63
64```shell
65k3d node delete k3d-ien-2-0
66```
67
68## Edge OS
69
70We will to take a closer look at the sds [cluster provisioning doc](https://docs.edge-infra.dev/edge/sds/clusterprovisioning/)
71
72Bootstrapping a dsds cluster scripts can be found [here](https://github.com/ncrvoyix-swt-retail/ien-iac/wiki)
View as plain text