Skip to content
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

add karmada failover example #5

Merged
merged 1 commit into from
Apr 23, 2023
Merged

Conversation

JadeFlute0127
Copy link
Contributor

Signed-off-by: [JadeFlute0127] [1635468471@qq.com]

What this PR does / why we need it:
add karmada failover example

Which issue(s) this PR fixes:
Part of #1

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 21, 2023
@JadeFlute0127
Copy link
Contributor Author

Current effect demo website:
https://killercoda.com/zhangdiandian/scenario/karmada-Failover-example

@@ -0,0 +1,3 @@
**Summary**

In this scenario, we learned how to achieve failover in karmada by simulating faults.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this scenario, we learned how to achieve failover in Karmada by simulating faults using taints.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"verify": "step2/verify.sh"
},
{
"title": "Simulate taint",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulate cluster failure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


Karmada aims to provide turnkey automation for multi-cluster application management in multi-cloud and hybrid cloud scenarios, with key features such as centralized multi-cloud management, high availability, failure recovery, and traffic scheduling.

In this scenario, we will learn how to achieve failover in karmada by simulating faults.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


create deployment named nginx

RUN `kubectl --kubeconfig /etc/karmada/karmada-apiserver.config apply -f ~/nginx/nginxDeployment.yaml`{{exec}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the cat command to display the details of the YAML file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also cat the PropagationPolicy file.

@@ -0,0 +1,7 @@
### Check the status and quantity distribution of pods and deployments

RUN `karmadactl --kubeconfig /etc/karmada/karmada-apiserver.config get deployment `{{exec}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think directly using karmadactl get pods xxxx --watch is a better idea, users could see the migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right

Copy link
Member

@jwcesign jwcesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other lgtm

@@ -0,0 +1,37 @@
{
"title": "karmada failover example",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Karmada

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


Karmada aims to provide turnkey automation for multi-cluster application management in multi-cloud and hybrid cloud scenarios, with key features such as centralized multi-cloud management, high availability, failure recovery, and traffic scheduling.

In this scenario, we will learn how to achieve failover in karmada by simulating faults using taints.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Karmada, please check other places and ensure that the first letter is capitalized.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that the first letter of the karmada string in all documents is already capitalized~

@@ -0,0 +1,3 @@
### Simulate taint

RUN `karmadactl --kubeconfig /etc/karmada/karmada-apiserver.config taint cluster kind-member2 hello=:NoExecute`{{exec}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failover-test=:NoExecute is a better name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah , fixed it


create deployment named nginx

RUN `kubectl --kubeconfig /etc/karmada/karmada-apiserver.config apply -f ~/nginx/nginxDeployment.yaml`{{exec}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also cat the PropagationPolicy file.

@@ -0,0 +1,3 @@
### Check the status and quantity distribution of pods

RUN `karmadactl --kubeconfig /etc/karmada/karmada-apiserver.config get pods nginx --watch`{{exec}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RUN karmadactl --kubeconfig /etc/karmada/karmada-apiserver.config get pods --watch{{exec}}

Signed-off-by: zhangdiandian <1635468471@qq.com>
@jwcesign
Copy link
Member

/lgtm
cc @RainbowMango for checking

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 23, 2023
@jwcesign
Copy link
Member

/approve

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jwcesign

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2023
@karmada-bot karmada-bot merged commit 96970e3 into karmada-io:main Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants