-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modified the Karmada tutorial description #614
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -180,11 +180,13 @@ which means the existing resources in `member1` cluster has been taken over by K | |||||||
|
||||||||
So far, you have finished the migration, isn't it so easy? | ||||||||
|
||||||||
### Apply higher priority PropagationPolicy | ||||||||
|
||||||||
|
||||||||
### Apply Higher Priority PropagationPolicy | ||||||||
|
||||||||
#### Step 5: Write the code | ||||||||
|
||||||||
Create new file `/tmp/pp-for-nginx-app.yaml` and copy text below to it: | ||||||||
Create a new file `/tmp/pp-for-nginx-app.yaml` and copy the text below into it: | ||||||||
|
||||||||
```yaml | ||||||||
apiVersion: policy.karmada.io/v1alpha1 | ||||||||
|
@@ -212,24 +214,48 @@ spec: | |||||||
|
||||||||
#### Step 6: Run the command | ||||||||
|
||||||||
Apply this higher priority PropagationPolicy to Karmada control plane. | ||||||||
Apply this higher priority `PropagationPolicy` to the Karmada control plane: | ||||||||
|
||||||||
```shell | ||||||||
$ kubectl --context karmada-apiserver apply -f /tmp/pp-for-nginx-app.yaml | ||||||||
kubectl --context karmada-apiserver apply -f /tmp/pp-for-nginx-app.yaml | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This |
||||||||
propagationpolicy.policy.karmada.io/nginx-pp created | ||||||||
``` | ||||||||
|
||||||||
#### Step 7: Verification | ||||||||
|
||||||||
```shell | ||||||||
$ kubectl --context member2 get deploy -o wide | ||||||||
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR | ||||||||
nginx-deploy 2/2 2 2 5m24s nginx nginx:latest app=nginx | ||||||||
$ kubectl --context member2 get svc -o wide | ||||||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR | ||||||||
nginx-svc NodePort 10.13.161.255 <none> 80:30000/TCP 54s app=nginx | ||||||||
... | ||||||||
kubectl --context member1 get deploy -o wide | ||||||||
kubectl --context member1 get svc -o wide | ||||||||
kubectl --context member2 get deploy -o wide | ||||||||
kubectl --context member2 get svc -o wide | ||||||||
``` | ||||||||
|
||||||||
As you see, you shall find `nginx` application related resource are all propagated to `member2` cluster, | ||||||||
which means the higher priority `PropagationPolicy` does work. | ||||||||
You should see the `nginx` application related resources originally in `member1` also propagated to `member2`, completing the migration of resources : | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for finding and correcting the mistake here! |
||||||||
|
||||||||
- **member1**: | ||||||||
|
||||||||
```shell | ||||||||
kubectl --context member1 get deploy -o wide | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR | ||||||||
nginx-deploy 2/2 2 2 5m24s nginx nginx:latest app=nginx | ||||||||
|
||||||||
kubectl --context member1 get svc -o wide | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR | ||||||||
nginx-svc NodePort 10.13.161.255 <none> 80:30000/TCP 54s app=nginx | ||||||||
``` | ||||||||
|
||||||||
- **member2**: | ||||||||
|
||||||||
```shell | ||||||||
kubectl --context member2 get deploy -o wide | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR | ||||||||
nginx-deploy 2/2 2 2 5m24s nginx nginx:latest app=nginx | ||||||||
|
||||||||
kubectl --context member2 get svc -o wide | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR | ||||||||
nginx-svc NodePort 10.13.161.255 <none> 80:30000/TCP 54s app=nginx | ||||||||
``` | ||||||||
|
||||||||
This confirms that the higher priority `PropagationPolicy` has effectively propagated the `nginx` application resources to both `member1` and `member2` clusters, meeting the desired propagation requirements. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Wrapping long lines can make it prettier in the editing mode. |
||||||||
|
||||||||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, why here added two empty line?