Skip to content

Commit c0e2471

Browse files
Some minor changes
Signed-off-by: Shivansh Bhatnagar <shivansh.bhatnagar.mat22@itbhu.ac.in>
1 parent f4d1408 commit c0e2471

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

docs/tutorials/resource-migration.md

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -180,61 +180,7 @@ which means the existing resources in `member1` cluster has been taken over by K
180180

181181
So far, you have finished the migration, isn't it so easy?
182182

183-
### Apply higher priority PropagationPolicy
184183

185-
#### Step 5: Write the code
186-
187-
Create new file `/tmp/pp-for-nginx-app.yaml` and copy text below to it:
188-
189-
```yaml
190-
apiVersion: policy.karmada.io/v1alpha1
191-
kind: PropagationPolicy
192-
metadata:
193-
name: nginx-pp
194-
spec:
195-
conflictResolution: Overwrite
196-
placement:
197-
clusterAffinity:
198-
clusterNames:
199-
- member1
200-
- member2 ## propagate to more clusters other than member1
201-
priority: 10 ## priority greater than above PropagationPolicy (10 > 0)
202-
preemption: Always ## preemption should equal to Always
203-
resourceSelectors:
204-
- apiVersion: apps/v1
205-
kind: Deployment
206-
name: nginx-deploy
207-
- apiVersion: v1
208-
kind: Service
209-
name: nginx-svc
210-
schedulerName: default-scheduler
211-
```
212-
213-
#### Step 6: Run the command
214-
215-
Apply this higher priority PropagationPolicy to Karmada control plane.
216-
217-
```shell
218-
$ kubectl --context karmada-apiserver apply -f /tmp/pp-for-nginx-app.yaml
219-
propagationpolicy.policy.karmada.io/nginx-pp created
220-
```
221-
222-
#### Step 7: Verification
223-
224-
```shell
225-
$ kubectl --context member2 get deploy -o wide
226-
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
227-
nginx-deploy 2/2 2 2 5m24s nginx nginx:latest app=nginx
228-
$ kubectl --context member2 get svc -o wide
229-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
230-
nginx-svc NodePort 10.13.161.255 <none> 80:30000/TCP 54s app=nginx
231-
...
232-
```
233-
234-
As you see, you shall find `nginx` application related resource are all propagated to `member2` cluster,
235-
which means the higher priority `PropagationPolicy` does work.
236-
237-
---
238184

239185
### Apply Higher Priority PropagationPolicy
240186

0 commit comments

Comments
 (0)