Skip to content

Commit

Permalink
Add contents
Browse files Browse the repository at this point in the history
  • Loading branch information
richabanker committed Nov 19, 2024
1 parent a0cf177 commit 0baa515
Showing 1 changed file with 73 additions and 4 deletions.
77 changes: 73 additions & 4 deletions content/en/docs/reference/instrumentation/zpages.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,76 @@
---
reviewers:
- richabanker
title: Kubernetes z-pages Reference
content_type: reference
auto_generated: true
description: >-
Details of the zpages data that Kubernetes components expose.
---
weight: 20
---

<!-- overview -->

{{< feature-state for_k8s_version="v1.32" state="alpha" >}}

By default, Kubernetes {{< skew currentVersion >}} publishes Service Level Indicator (SLI) metrics
for each Kubernetes component binary. This metric endpoint is exposed on the serving
HTTPS port of each component, at the path `/metrics/slis`. The
`ComponentSLIs` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
defaults to enabled for each Kubernetes component as of v1.27.

<!-- body -->

## z-pages

A suite of z-endpoints to enhance debuggability of Kubernetes control plane components. Currently we have the following components:

1. flagz
2. statusz

### flagz

With ComponentFlagz enabled, each Kubernetes component exposes a new /flagz endpoint.

You can use this endpoint to ...

The flagz data for apiserver looks like this:

```
kube-apiserver flags
Warning: This endpoint is not meant to be machine parseable, has no formatting compatibility guarantees and is for debugging purposes only.
advertise-address=192.168.8.2
contention-profiling=false
enable-priority-and-fairness=true
profiling=true
authorization-mode=[Node,RBAC]
authorization-webhook-cache-authorized-ttl=5m0s
authorization-webhook-cache-unauthorized-ttl=30s
authorization-webhook-version=v1beta1
default-watch-cache-size=100
```

#### Using flagz

This endpoint is only meant to be used for debugging purposes when the user wants to quickly know which command line flags was the component binary started with. This endpoint is not meant to be scraped with the expectation that the contents returned by this endpoint are stable.

### statusz

With ComponentStatusz enabled, each Kubernetes component exposes a new /statusz endpoint.

You can use this endpoint to ...

The statusz data for apiserver looks like this:

```
kube-apiserver statusz
Warning: This endpoint is not meant to be machine parseable, has no formatting compatibility guarantees and is for debugging purposes only.
Started: Wed Oct 16 21:03:43 UTC 2024
Up: 0 hr 00 min 16 sec
Go version: go1.23.2
Binary version: 1.32.0-alpha.0.1484&#43;5eeac4f21a491b-dirty
Emulation version: 1.32.0-alpha.0.1484
```

#### Using statusz

This endpoint is only meant to be used for debugging purposes when the user wants to quickly know high level information for the component, for ex. the Kubernetes version it is at, its emulation version, its start time details etc. This endpoint is not meant to be scraped with the expectation that the contents returned by this endpoint are stable.

0 comments on commit 0baa515

Please sign in to comment.