@@ -72,31 +72,22 @@ Tools Required:
72
72
* [ yq] ( https://github.com/mikefarah/yq )
73
73
* [ helm] ( https://helm.sh/docs/helm/helm_install/ )
74
74
75
- Pre-requisites: Two clusters named ` source ` and ` destination ` .
75
+ Pre-requisites: Two Kubernetes clusters named ` source ` and ` destination ` .
76
76
* ` StatefulSetStartOrdinal ` feature gate is enabled on both clusters
77
- * [ MultiClusterServices] ( https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/1645-multi-cluster-services-api )
78
- support is enabled
79
77
* The same default ` StorageClass ` is installed on both clusters. This
80
78
` StorageClass ` should provision underlying storage that is accessible from
81
79
both clusters.
80
+ * A flat network topology that allows for pods to be accessible across both
81
+ Kubernetes clusters. If creating clusters on a cloud provider, this
82
+ configuration may be called private cloud or private network.
82
83
83
84
1 . Create a demo namespace on both clusters.
84
85
85
86
```
86
87
kubectl create ns kep-3335
87
88
```
88
89
89
- 2 . Deploy a ` ServiceExport ` on both clusters.
90
-
91
- ```
92
- kind: ServiceExport
93
- apiVersion: multicluster.x-k8s.io/v1alpha1
94
- metadata:
95
- namespace: kep-3335
96
- name: redis-redis-cluster-headless
97
- ```
98
-
99
- 3 . Deploy a Redis cluster on ` source ` .
90
+ 2 . Deploy a Redis cluster on ` source ` .
100
91
101
92
```
102
93
helm repo add bitnami https://charts.bitnami.com/bitnami
@@ -105,7 +96,7 @@ support is enabled
105
96
--set persistence.size=1Gi
106
97
```
107
98
108
- 4 . On ` source ` , check the replication status.
99
+ 3 . On ` source ` , check the replication status.
109
100
110
101
```
111
102
kubectl exec -it redis-redis-cluster-0 -- /bin/bash -c \
@@ -121,7 +112,7 @@ support is enabled
121
112
2cff613d763b22c180cd40668da8e452edef3fc8 10.104.0.17:6379@16379 master - 0 1669764410000 2 connected 5461-10922
122
113
```
123
114
124
- 5 . On ` destination ` , deploy Redis with zero replicas.
115
+ 4 . On ` destination ` , deploy Redis with zero replicas.
125
116
126
117
```
127
118
helm install redis --namespace kep-3335 \
@@ -132,13 +123,13 @@ support is enabled
132
123
--set existingSecret=redis-redis-cluster
133
124
```
134
125
135
- 6 . Scale down replica ` redis-redis-cluster-5 ` in the source cluster.
126
+ 5 . Scale down replica ` redis-redis-cluster-5 ` in the source cluster.
136
127
137
128
```
138
129
kubectl patch sts redis-redis-cluster -p '{"spec": {"replicas": 5}}'
139
130
```
140
131
141
- 7 . Migrate dependencies from ` source ` to ` destination ` .
132
+ 6 . Migrate dependencies from ` source ` to ` destination ` .
142
133
143
134
The following commands copy resources from ` source ` to ` destionation ` . Details
144
135
that are not relevant in ` destination ` cluster are removed (eg: ` uid ` ,
@@ -173,14 +164,14 @@ support is enabled
173
164
kubectl create -f /tmp/secret-redis-redis-cluster.yaml
174
165
```
175
166
176
- 8 . Scale up replica ` redis-redis-cluster-5 ` in the destination cluster, with a
167
+ 7 . Scale up replica ` redis-redis-cluster-5 ` in the destination cluster, with a
177
168
start ordinal of 5:
178
169
179
170
```
180
171
kubectl patch sts redis-redis-cluster -p '{"spec": {"ordinals": {"start": 5}, "replicas": 1}}'
181
172
```
182
173
183
- 9 . On the source cluster, check the replication status.
174
+ 8 . On the source cluster, check the replication status.
184
175
185
176
```
186
177
kubectl exec -it redis-redis-cluster-0 -- /bin/bash -c \
0 commit comments