You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debugging Kubernetes control plane components can be challenging, especially when you need to quickly understand the runtime state of a component or verify its configuration. With Kubernetes 1.35, we're enhancing the z-pages debugging endpoints with structured, machine-parseable responses that make it easier to build tooling and automate troubleshooting workflows.
12
12
13
13
## What are z-pages?
14
14
15
-
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.
15
+
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.
16
16
17
17
Currently, Kubernetes supports two primary z-page endpoints:
18
18
19
-
-**`/statusz`**: Displays high-level component information including version information, start time, uptime, and available debug paths
20
-
-**`/flagz`**: Shows all command-line flags and their values used to start the component (with confidential values redacted for security)
19
+
`/statusz`
20
+
: Displays high-level component information including version information, start time, uptime, and available debug paths
21
+
22
+
`/flagz`
23
+
: Shows all command-line arguments and their values used to start the component (with confidential values redacted for security)
21
24
22
25
These endpoints are valuable for human operators who need to quickly inspect component state, but until now, they only returned plain text output that was difficult to parse programmatically.
23
26
@@ -30,8 +33,9 @@ Kubernetes 1.35 introduces structured, versioned responses for both `/statusz` a
30
33
The new structured responses are opt-in. Without specifying an `Accept` header, the endpoints continue to return the familiar plain text format:
@@ -113,7 +117,7 @@ Instead of parsing plain text, monitoring tools can now easily extract specific
113
117
114
118
### 2. **Better debugging tools**
115
119
116
-
Developers can build sophisticated debugging tools that compare configurations across multiple components or track configuration drift over time. The structured format makes it trivial to diff configurations or validate that components are running with expected settings.
120
+
Developers can build sophisticated debugging tools that compare configurations across multiple components or track configuration drift over time. The structured format makes it trivial to `diff` configurations or validate that components are running with expected settings.
117
121
118
122
### 3. **API versioning and stability**
119
123
@@ -130,24 +134,32 @@ Both endpoints require feature gates to be enabled:
130
134
131
135
### Example: Getting structured responses
132
136
133
-
Here's an example using `curl` to retrieve structured JSON responses:
137
+
Here's an example using `curl` to retrieve structured JSON responses from the kube-apiserver:
The examples above use client certificate authentication and verify the server's certificate using `--cacert`.
159
+
If you need to bypass certificate verification in a test environment, you can use `--insecure` (or `-k`),
160
+
but this should never be done in production as it makes you vulnerable to man-in-the-middle attacks.
161
+
{{< /note >}}
162
+
151
163
## Important considerations
152
164
153
165
### Alpha feature status
@@ -162,20 +174,20 @@ The structured z-page responses are an **alpha** feature in Kubernetes 1.35. Thi
162
174
163
175
z-pages expose internal component information and require proper access controls. Here are the key security considerations:
164
176
165
-
**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.
177
+
**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. If your cluster uses RBAC, you can manage access by granting appropriate permissions to this group.
166
178
167
-
**Authentication**: As shown in the examples, you need to use appropriate authentication mechanisms (such as client certificates) to access these endpoints. The endpoints are not publicly accessible and require valid credentials.
179
+
**Authentication**: The authentication requirements for these endpoints depend on your cluster's configuration. Unless anonymous authentication is enabled for your cluster, you typically need to use authentication mechanisms (such as client certificates) to access these endpoints.
168
180
169
181
**Information disclosure**: These endpoints reveal configuration details about your cluster components, including:
170
182
- Component versions and build information
171
-
- All command-line flags and their values (with confidential values redacted)
183
+
- All command-line arguments and their values (with confidential values redacted)
172
184
- Available debug endpoints
173
185
174
186
Only grant access to trusted operators and debugging tools. Avoid exposing these endpoints to unauthorized users or automated systems that don't require this level of access.
175
187
176
188
### Future evolution
177
189
178
-
As the feature matures, we expect to:
190
+
As the feature matures, we (Kubernetes SIG Instrumentation) expect to:
179
191
180
192
- Introduce `v1beta1` and eventually `v1` versions of the API
181
193
- Gather community feedback on the response schema
0 commit comments