Skip to content

docs: Add README.md for nginx sample#7179

Merged
karmada-bot merged 1 commit intokarmada-io:masterfrom
abhicodes11:add-nginx-readme
Mar 9, 2026
Merged

docs: Add README.md for nginx sample#7179
karmada-bot merged 1 commit intokarmada-io:masterfrom
abhicodes11:add-nginx-readme

Conversation

@abhicodes11
Copy link
Contributor

What type of PR is this?

/kind documentation

What this PR does / why we need it:

Adds a comprehensive README to the nginx sample to help new users understand and run the example step-by-step.

The README includes:

  • Prerequisites and setup verification
  • Detailed explanation of each file
  • Step-by-step deployment instructions
  • Verification steps
  • Cleanup instructions
  • Links to relevant documentation

Which issue(s) this PR fixes:

N/A (documentation enhancement)

Why this matters:

The nginx sample is often the first example new users try. A clear README reduces confusion and improves the onboarding experience.

Special notes for reviewers:

I tested these steps on a fresh Karmada installation to ensure accuracy.

@karmada-bot karmada-bot added the kind/documentation Categorizes issue or PR as related to documentation. label Feb 7, 2026
@karmada-bot
Copy link
Contributor

Welcome @abhicodes11! It looks like this is your first PR to karmada-io/karmada 🎉

@gemini-code-assist
Copy link

Summary of Changes

Hello @abhicodes11, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience for the Nginx sample by introducing a detailed README.md. The new documentation provides clear, actionable instructions for deploying and managing an Nginx application across multiple clusters using Karmada, thereby streamlining the initial setup and understanding for new users.

Highlights

  • New Documentation Added: A comprehensive README.md file has been added to the samples/nginx directory.
  • Enhanced User Guidance: The new README provides a detailed, step-by-step guide for deploying an Nginx application across multiple clusters using Karmada, covering prerequisites, deployment, verification, and cleanup.
  • Improved Onboarding Experience: This documentation aims to reduce confusion and improve the onboarding process for new users trying the Nginx sample, which is often their first interaction with Karmada examples.
Changelog
  • samples/nginx/README.md
    • Added a new README.md file detailing the Nginx deployment example with Karmada.
    • Includes sections on prerequisites, file explanations, step-by-step deployment, verification, cleanup, and links to relevant documentation.
Activity
  • The author, abhicodes11, created this pull request to add documentation for the Nginx sample.
  • The author confirmed that the steps outlined in the new README were tested on a fresh Karmada installation to ensure accuracy.
  • The pull request is categorized as a documentation enhancement (/kind documentation).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 7, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a helpful README.md for the nginx sample, which will greatly improve the onboarding experience for new users. The guide is well-structured and clear. I've found one minor omission in the cleanup instructions that should be addressed to make the example fully complete.

Comment on lines +85 to +86
kubectl delete -f propagationpolicy.yaml
kubectl delete -f deployment.yaml

Choose a reason for hiding this comment

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

medium

The cleanup instructions are incomplete. The overridepolicy.yaml is created in the optional step 4, but its deletion is missing from the cleanup section. To ensure a complete cleanup and avoid leaving orphaned resources, the command to delete the OverridePolicy should also be included.

Suggested change
kubectl delete -f propagationpolicy.yaml
kubectl delete -f deployment.yaml
kubectl delete -f overridepolicy.yaml
kubectl delete -f propagationpolicy.yaml
kubectl delete -f deployment.yaml

Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang left a comment

Choose a reason for hiding this comment

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

@abhicodes11 Thanks for your contribution.
The sample folder is just a file for developers to quickly test, but adding a readme file doesn't seem to be a problem either.
/lgtm

For more information about these features, you can refer to the documents in the website repository.

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 10, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.01%. Comparing base (da905ac) to head (51d5c89).
⚠️ Report is 78 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7179      +/-   ##
==========================================
- Coverage   42.09%   42.01%   -0.09%     
==========================================
  Files         871      874       +3     
  Lines       53288    53542     +254     
==========================================
+ Hits        22434    22494      +60     
- Misses      29168    29363     +195     
+ Partials     1686     1685       -1     
Flag Coverage Δ
unittests 42.01% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings February 11, 2026 14:03
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2026
@abhicodes11
Copy link
Contributor Author

@zhzhuang-zju You're right! The Multi-Cluster Service link isn't relevant since this example only shows propagation and override policies. I've removed it to keep the documentation focused on what's actually demonstrated. Thanks for the feedback!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new README for the samples/nginx example to help users deploy nginx across member clusters with Karmada.

Changes:

  • Add prerequisites and environment verification steps.
  • Document the sample manifests and provide step-by-step deployment/verification instructions.
  • Add cleanup steps and links to relevant Karmada docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Before running this example, ensure you have:
- A Karmada control plane running (see [Quick Start](../../README.md#quick-start))
- At least one member cluster joined to Karmada
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The prerequisites say “at least one member cluster”, but this sample’s propagationpolicy.yaml explicitly targets member1 and member2. As written, the steps will not work on a single member cluster; either update prerequisites to require two joined clusters (named member1/member2) or adjust the policy/steps to match a single-cluster setup.

Suggested change
- At least one member cluster joined to Karmada
- Two member clusters (`member1` and `member2`) joined to Karmada

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +32
## Step-by-Step Guide

### 1. Deploy the nginx application
```bash
kubectl create -f deployment.yaml
```
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The commands use relative filenames (e.g., deployment.yaml) but the README never tells the reader to cd samples/nginx first. This will fail if someone runs the instructions from the repo root (as the main README does). Add an explicit cd step near the top or switch the commands to use samples/nginx/... paths consistently.

Copilot uses AI. Check for mistakes.
export KUBECONFIG=$HOME/.kube/karmada.config
kubectl config use-context karmada-apiserver

# Delete resources
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

If the optional overridepolicy.yaml is applied, the cleanup instructions should also delete it; otherwise the sample leaves an OverridePolicy behind in the Karmada control plane. Consider adding kubectl delete -f overridepolicy.yaml (or noting it’s only needed if step 4 was run).

Suggested change
# Delete resources
# Delete resources (include overridepolicy.yaml if you applied step 4)
kubectl delete -f overridepolicy.yaml

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +19
```bash
# Verify you're connected to Karmada
kubectl config use-context karmada-apiserver

# Check member clusters are ready
kubectl get clusters
```
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The verification snippet switches context to karmada-apiserver but doesn’t show setting KUBECONFIG to the Karmada kubeconfig (e.g., $HOME/.kube/karmada.config). Other samples (and the root Quick Start) include this, and without it the context may not exist in the user’s default kubeconfig.

Copilot uses AI. Check for mistakes.
@XiShanYongYe-Chang
Copy link
Member

Hi @abhicodes11 can you help squash the commits into one?

@XiShanYongYe-Chang
Copy link
Member

Kindly ping @abhicodes11

@abhicodes11
Copy link
Contributor Author

Hi @XiShanYongYe-Chang, apologies for the delay. I’ve squashed the commits into a single commit and force-pushed the branch. Please let me know if anything else needs to be updated.

@XiShanYongYe-Chang
Copy link
Member

Thanks @abhicodes11
/approve

Leave lgtm to @zhzhuang-zju make confirm.

@karmada-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XiShanYongYe-Chang

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

The pull request process is described here

Details 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 Feb 27, 2026
@XiShanYongYe-Chang
Copy link
Member

File download timed out.

FAIL: operator/pkg/tasks/init TestRunCrdsDownload/RunCrdsDownload_DownloadingCRDs_CRDsDownloadedSuccessfully (60.03s)
    crd_test.go:190: unexpected error, got: failed to download CRD tar, err: Get "https://github.com/karmada-io/karmada/releases/download/v1.11.1/crds.tar.gz": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    --- FAIL: TestRunCrdsDownload/RunCrdsDownload_DownloadingCRDs_CRDsDownloadedSuccessfully (60.03s)

/retest


## Learn More

- [Propagation Policy Documentation](https://karmada.io/docs/userguide/scheduling/resource-propagating)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [Propagation Policy Documentation](https://karmada.io/docs/userguide/scheduling/resource-propagating)
- [Propagation Policy Documentation](https://karmada.io/docs/userguide/scheduling/propagation-policy)

This link will be deprecated after the release of release‑1.17.
We can wait until release 1.17 is published, and then merge the change.

Copy link
Member

Choose a reason for hiding this comment

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

Hi @abhicodes11, here need some updation

@XiShanYongYe-Chang
Copy link
Member

kindly ping @abhicodes11

Signed-off-by: Abhi <abhicodes11@users.noreply.github.com>

Remove irrelevant Multi-Cluster Service link

Signed-off-by: Abhi <abhicodes11@users.noreply.github.com>
@abhicodes11
Copy link
Contributor Author

@zhzhuang-zju @XiShanYongYe-Chang Apologies for the delay - I've updated the deprecated documentation link as requested. The PR should now address all feedback. Thanks for your patience!

@XiShanYongYe-Chang
Copy link
Member

Thanks @abhicodes11 No need to apologize.

@zhzhuang-zju
Copy link
Contributor

Thanks, I have no further comments. Once karmada-io/website#987 is merged, we can merge this PR too.

@zhzhuang-zju
Copy link
Contributor

/retest

@zhzhuang-zju
Copy link
Contributor

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 9, 2026
@karmada-bot karmada-bot merged commit ac71a9e into karmada-io:master Mar 9, 2026
24 of 25 checks passed
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. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants