Skip to content

[codex] docs: explain k8s proxy benefits#847

Open
officialasishkumar wants to merge 9 commits intomainfrom
docs/k8s-proxy-benefits-update
Open

[codex] docs: explain k8s proxy benefits#847
officialasishkumar wants to merge 9 commits intomainfrom
docs/k8s-proxy-benefits-update

Conversation

@officialasishkumar
Copy link
Copy Markdown
Member

@officialasishkumar officialasishkumar commented Apr 29, 2026

What has changed?

This PR expands the Kubernetes Proxy API docs to explain why teams should use the in-cluster proxy instead of wiring keploy enterprise directly into each application Pod.

The update documents the main user-facing benefits: auto-replay during recording, release-aware replay context, capture-time deduplication, REST and MCP automation surfaces, schema generation and schema-conflict handling, the upcoming smart test set model, and local CI replay. It also clarifies edge cases from the implementation, including low-risk noise handling, re-record suite-linking gates, schema insert-vs-update behavior, and the current status of historical/smart-test-set consolidation.

This PR also adds a Kubernetes architecture overview image to the Kubernetes setup guide.

This PR does not resolve a linked issue.

Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Documentation update (if none of the other choices apply).

How Has This Been Tested?

  • Ran git diff --check -- versioned_docs/version-4.0.0/running-keploy/k8s-proxy-api.md.
  • Ran git diff --check -- versioned_docs/version-4.0.0/keploy-cloud/kubernetes.md static/img/k8s-arch.png.
  • Ran vale versioned_docs/version-4.0.0/keploy-cloud/kubernetes.md; it only reports a pre-existing frontmatter issue outside this PR's changed lines.
  • Ran npm run build successfully after adding the image; Docusaurus generated static files in build.
  • Ran npm run serve -- --host 127.0.0.1 --port 3010 successfully earlier on this branch; Docusaurus served the build at http://127.0.0.1:3010/docs/, then the local server was stopped.

The visual asset added by this PR is static/img/k8s-arch.png.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar force-pushed the docs/k8s-proxy-benefits-update branch from 284d697 to 9c4c942 Compare April 29, 2026 16:14
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Copy link
Copy Markdown
Member

@amaan-bhati amaan-bhati left a comment

Choose a reason for hiding this comment

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

Thank you for this deep-dive on the Kubernetes Proxy benefits! The updated section is significantly more useful than the bullet-list version - walking through each capability with concrete detail (auto-replay cadence, noise classification buckets, MCP tool names, CI workflow steps) gives teams exactly the context they need to decide whether to adopt the proxy.

Issues to be Considered:

  • The heading change removes backtick formatting from `keploy enterprise` (now rendered as plain text keploy enterprise directly). Since this is a CLI command name, keeping it in code formatting helps readers scan the page. Worth restoring.

  • Section 5 (Smart test set) is labelled "Upcoming" in the heading but the body text switches between present and future tense in a way that may confuse readers about what is actually available today vs. on the roadmap. Consider adding a short callout box at the top of that section like > **Status: Not yet active in the current record/start path." so it's unambiguous.

  • This PR modifies k8s-proxy-api.md, which is also the target of PR #845 (the revert PR currently open). These two will produce a merge conflict. Please coordinate with the maintainers on which lands first, or rebase onto the result of #845 before this is merged.

  • The new k8s-arch.png image is added but not tested in both Docusaurus light and dark themes. The image alt text (How Keploy works on Kubernetes architecture overview) is descriptive which is great - just make sure the image itself renders legibly in both color modes.

  • The Local CI replay section references keploy test sandbox as the command but the earlier docs use keploy test. If sandbox is a separate subcommand, please add a note pointing readers to the CLI reference so they know where to find the flags.

Overall this is a substantive and well-written addition. Sorting out the merge conflict with the revert PR and clarifying the upcoming feature boundary are the main things to address before this is ready.

Copy link
Copy Markdown
Member

@khareyash05 khareyash05 left a comment

Choose a reason for hiding this comment

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

please address

Each test case is exercised once against a freshly rolled Pod and classified into one of three buckets:

- **Pass:** kept as a real, stable test case.
- **High-risk failure:** marked as failed (a real regression to investigate).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we do this? isnt it just pass or fail

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes, we do have this.. we added this in report as well that gets generated after running keploy test

Copy link
Copy Markdown
Member

@khareyash05 khareyash05 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@charankamarapu charankamarapu left a comment

Choose a reason for hiding this comment

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

Please address the comment rest looks good

> [!NOTE]
> This documentation covers **local Kind cluster** setup. Documentation for **hosted cluster** setup is coming soon.
## How Keploy works on Kubernetes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the arch picture is missing few things.

  1. sidecar should be inside pod
  2. Only self hosted arch is present
  3. Secrets missing
  4. MITM proxy hope reader doesn't get confused with other product - https://github.com/mitmproxy/mitmproxy
  5. why does Kubernetes api-server has test case, mocks mentioned.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

updated the image

- The **Kubernetes Proxy REST API** ([Endpoint reference](#endpoint-reference)) handles in-cluster operations such as starting/stopping recording, kicking off replay, fetching session status, and reading logs or reports. All routes outside `/healthz` and the admission webhook sit behind shared-token Bearer auth.
- The **Keploy API server MCP endpoint** exposes higher-level tools for AI coding tools, including Claude Code, Cursor, Windsurf, and VS Code. This is how an AI agent in your editor authors test suites, runs replays, and scaffolds CI pipelines without you copy-pasting curl commands.

The MCP surface includes around a dozen tools. The headline ones:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

when it comes to just k8sproxy these and integration tests these are not useful. Mentioning them will confuse user.

Copy link
Copy Markdown
Member Author

@officialasishkumar officialasishkumar Apr 30, 2026

Choose a reason for hiding this comment

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

removed it

Refine the documentation for the Kubernetes Proxy REST API, emphasizing that all console
actions are accessible via REST calls. Removed details about the MCP server and its tools,
focusing instead on the available endpoints for recording, testing, and status monitoring.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar force-pushed the docs/k8s-proxy-benefits-update branch from b9c0e21 to dbee596 Compare April 30, 2026 21:52
Copilot AI review requested due to automatic review settings May 1, 2026 07:41
Copy link
Copy Markdown
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

Expands the Kubernetes Proxy REST API documentation to explain why teams should prefer the in-cluster proxy model over running keploy enterprise directly in each application Pod, and adds a Kubernetes architecture overview image to the Kubernetes setup guide.

Changes:

  • Added a detailed “Why Kubernetes Proxy” benefits section (auto-replay, deduplication, automation surfaces, schema management, upcoming smart test set, and local CI replay).
  • Inserted a Kubernetes architecture overview image into the Kubernetes setup guide.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
versioned_docs/version-4.0.0/running-keploy/k8s-proxy-api.md Replaces the brief benefits list with a structured, detailed rationale for using the Kubernetes Proxy, including operational/behavioral edge cases.
versioned_docs/version-4.0.0/keploy-cloud/kubernetes.md Adds a “How Keploy works on Kubernetes” section with an architecture overview image.

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

Comment thread versioned_docs/version-4.0.0/running-keploy/k8s-proxy-api.md Outdated
Comment thread versioned_docs/version-4.0.0/running-keploy/k8s-proxy-api.md
Comment thread versioned_docs/version-4.0.0/running-keploy/k8s-proxy-api.md Outdated
Replaced the existing k8s-arch.png with a new version to enhance visual
representation of the architecture.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar force-pushed the docs/k8s-proxy-benefits-update branch from aef783a to da812aa Compare May 1, 2026 07:48
officialasishkumar and others added 2 commits May 1, 2026 13:51
Updated the capitalization of "Keploy Enterprise" in the Kubernetes
Proxy API documentation for consistency and clarity.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar force-pushed the docs/k8s-proxy-benefits-update branch from d38398b to b8725ca Compare May 1, 2026 13:50
Drop the Local CI replay point from the v4.0.0 k8s proxy API docs to
keep the page aligned with the requested scope.

Made-with: Cursor
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar force-pushed the docs/k8s-proxy-benefits-update branch from b8725ca to 0bb8a91 Compare May 1, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants