Skip to content

Conversation

@richabanker
Copy link
Contributor

Description

Adds a blog for Kubernetes component zpages

Issues

kubernetes/enhancements#4827
kubernetes/enhancements#4828

@k8s-ci-robot k8s-ci-robot added area/blog Issues or PRs related to the Kubernetes Blog subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 31, 2025
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 31, 2025
@netlify
Copy link

netlify bot commented Oct 31, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit a32bd1f
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/690502725efac30008715b00
😎 Deploy Preview https://deploy-preview-53030--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 31, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 58efab3
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/6917e32bcc4c850008a7ea2c
😎 Deploy Preview https://deploy-preview-53030--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lmktfy
Copy link
Member

lmktfy commented Nov 4, 2025

Not yet ready for review, so:
/retitle [WIP] Add blog article about zpages

@k8s-ci-robot k8s-ci-robot changed the title Add blog for zpages [WIP] Add blog article about zpages Nov 4, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 4, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 14, 2025
@richabanker richabanker force-pushed the zpages branch 6 times, most recently from 3e5aaa1 to 77b8c8a Compare November 14, 2025 00:18
@richabanker richabanker changed the title [WIP] Add blog article about zpages Add blog article about zpages Nov 14, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 14, 2025
@richabanker
Copy link
Contributor Author

Ready for a first pass now @sftim , thanks!

Copy link
Member

@lmktfy lmktfy left a comment

Choose a reason for hiding this comment

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

Thanks. I do have quite a lot of feedback on it I'm afraid.

The new structured responses are opt-in. Without specifying an `Accept` header, the endpoints continue to return the familiar plain text format:

```
$ curl -k --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt \
Copy link
Member

Choose a reason for hiding this comment

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

Even in a blog article, I strongly don't recommend teaching / tacitly endorsing curl -k.

Either suggest an example using a plain HTTP port, or give the example without the security bypass and then mention the *long" flag name in a comment. In other words, make people think before they bypass the check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good, updated examples to not use the -k flag and added a note regarding bypassing cert authn


```bash
# Get structured statusz response
curl -k \
Copy link
Member

Choose a reason for hiding this comment

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

See earlier comment about the security check bypass.

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

https://localhost:6443/statusz | jq .

# Get structured flagz response
curl -k \
Copy link
Member

Choose a reason for hiding this comment

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

See earlier comment about the security check bypass.

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


z-pages expose internal component information and require proper access controls. Here are the key security considerations:

**RBAC authorization**: Access to z-page endpoints is restricted to members of the `system:monitoring` group, which follows the same authorization model as other debugging endpoints like `/healthz`, `/livez`, and `/readyz`. This ensures that only authorized users and service accounts can access debugging information.
Copy link
Member

Choose a reason for hiding this comment

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

nit: not all clusters use RBAC for authz

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clarified to say - "if you use RBAC ..."


## What are z-pages?

z-pages are special debugging endpoints exposed by Kubernetes control plane components. Introduced as an alpha feature in Kubernetes 1.32, these endpoints provide runtime diagnostics for components like kube-apiserver, kube-controller-manager, kube-scheduler, kubelet and kube-proxy. The name "z-pages" comes from the convention of using `/z*` paths for debugging endpoints.
Copy link
Member

Choose a reason for hiding this comment

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

nit: The wildcard doesn't look quite right here.

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


Currently, Kubernetes supports two primary z-page endpoints:

- **`/statusz`**: Displays high-level component information including version information, start time, uptime, and available debug paths
Copy link
Member

Choose a reason for hiding this comment

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

nit: this could be a Markdown description list (and I recommend using one)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Currently, Kubernetes supports two primary z-page endpoints:

- **`/statusz`**: Displays high-level component information including version information, start time, uptime, and available debug paths
- **`/flagz`**: Shows all command-line flags and their values used to start the component (with confidential values redacted for security)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- **`/flagz`**: Shows all command-line flags and their values used to start the component (with confidential values redacted for security)
- **`/flagz`**: Shows all command-line arguments and their values used to start the component (with confidential values redacted for security)

Despite the URL path, we actually list command line arguments that take non-boolean values
(the Go ecosystem uses "flag" to describe all command line options, but the wider world of IT usually doesn't; argv for example rather than flagv)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

"startTime": "2025-10-29T00:30:01Z",
"uptimeSeconds": 856,
"goVersion": "go1.23.2",
"binaryVersion": "1.35.0-alpha.0.1595+b288caa2c26536-dirty",
Copy link
Member

Choose a reason for hiding this comment

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

nit: could make this look like a released version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

"flags": {
"advertise-address": "192.168.8.4",
"allow-privileged": "true",
"authorization-mode": "[Node,RBAC]",
Copy link
Member

Choose a reason for hiding this comment

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

This is odd; does this mean that the string value is an embedded JSON document, or a Go literal? If we did one day serve a CBOR response, would the field value be CBOR bytes?


Maybe we should highlight this as a detail that isn't yet settled and that may change before beta?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The value is a string representation of how the authorization-mode flag was set on the command line, so for CBOR, I am guessing it would print out a string "CBOR" likely ..?

@richabanker richabanker force-pushed the zpages branch 2 times, most recently from ed89867 to eea460e Compare November 14, 2025 22:02

### Example: Getting structured responses

Here's an example using `curl` to retrieve structured JSON responses:
Copy link
Contributor

Choose a reason for hiding this comment

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

Mention that this is a curl request and JSON responses from kube-apiserver?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh right, done thanks!

Copy link
Contributor

@Serenity611 Serenity611 left a comment

Choose a reason for hiding this comment

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

Reviewed from a general proofreading/style guide alignment perspective and made a few small suggestions :) Looks great!

Also wanted to note that as a non-technical person, I found this article very easy to follow and understand. It's laid out clearly and concisely, really enjoyable to read!

Co-authored-by: Susan Sica <90214772+Serenity611@users.noreply.github.com>
@graz-dev
Copy link
Contributor

Hi @richabanker 👋 v1.35 Communications team here,

@macsko as author of #53012, I'd like you to be a writing buddy for @richabanker on this PR.

Please:

  • Review this PR, paying attention to the guidelines and review hints
  • Update your own PR based on any best practices you identify that should be applied
  • Remember to be compassionate with your fellow article author

@graz-dev
Copy link
Contributor

Hi @richabanker 👋 -- this is Graziano (@graz-dev) from the v1.35 Communications Team!

Just a friendly reminder that we are approaching the feature blog "ready for review" deadline: Friday 21st November. We ask you to have the blog in non-draft state, and all write-up to be complete, so that we can start the blog review from SIG Docs Blog team.

If you have any questions or need help, please don't hesitate to reach out to me or any of the Communications Team members. We are here to help you!

Copy link
Contributor

@graz-dev graz-dev left a comment

Choose a reason for hiding this comment

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

/lgtm

I'm happy with the content and the overall readability of this blog post.
@lmktfy I saw that most of your suggestions were implemented, so if it is ok for you we can merge it 🚀

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 21, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 69693bf934697aa198eaaff34aaff49c489c55cc

@lmktfy
Copy link
Member

lmktfy commented Nov 21, 2025

@graz-dev this isn't (directly) a change to the live docs, so you can approve this one yourself. Feel free to do so.

@graz-dev
Copy link
Contributor

Nice

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: graz-dev

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2025
@k8s-ci-robot k8s-ci-robot merged commit a960269 into kubernetes:main Nov 21, 2025
6 checks passed
@wenjiaswe
Copy link
Contributor

cc @bowei

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. area/blog Issues or PRs related to the Kubernetes Blog subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", 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.

7 participants