From a0cf177fac2c283bbaa6d6a37f68bb1aef1a1c4e Mon Sep 17 00:00:00 2001 From: Richa Banker Date: Tue, 15 Oct 2024 11:01:55 -0700 Subject: [PATCH 1/2] Add docs for zpages --- content/en/docs/reference/instrumentation/zpages.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 content/en/docs/reference/instrumentation/zpages.md diff --git a/content/en/docs/reference/instrumentation/zpages.md b/content/en/docs/reference/instrumentation/zpages.md new file mode 100644 index 0000000000000..6d68a5dd24a3c --- /dev/null +++ b/content/en/docs/reference/instrumentation/zpages.md @@ -0,0 +1,7 @@ +--- +title: Kubernetes z-pages Reference +content_type: reference +auto_generated: true +description: >- + Details of the zpages data that Kubernetes components expose. +--- \ No newline at end of file From c70813aab2ef7b71844c9ac7168bf828c774b667 Mon Sep 17 00:00:00 2001 From: Richa Banker Date: Mon, 18 Nov 2024 16:10:03 -0800 Subject: [PATCH 2/2] Add contents --- .../feature-gates/component-flagz.md | 0 .../feature-gates/component-statusz.md | 0 .../docs/reference/instrumentation/zpages.md | 64 +++++++++++++++++-- 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 content/en/docs/reference/command-line-tools-reference/feature-gates/component-flagz.md create mode 100644 content/en/docs/reference/command-line-tools-reference/feature-gates/component-statusz.md diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates/component-flagz.md b/content/en/docs/reference/command-line-tools-reference/feature-gates/component-flagz.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates/component-statusz.md b/content/en/docs/reference/command-line-tools-reference/feature-gates/component-statusz.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/content/en/docs/reference/instrumentation/zpages.md b/content/en/docs/reference/instrumentation/zpages.md index 6d68a5dd24a3c..9a52c7330bfd5 100644 --- a/content/en/docs/reference/instrumentation/zpages.md +++ b/content/en/docs/reference/instrumentation/zpages.md @@ -1,7 +1,61 @@ --- -title: Kubernetes z-pages Reference +reviewers: +- richabanker +title: Kubernetes z-pages content_type: reference -auto_generated: true -description: >- - Details of the zpages data that Kubernetes components expose. ---- \ No newline at end of file +weight: 20 +--- + + + +{{< feature-state for_k8s_version="v1.32" state="alpha" >}} + +Kubernetes core components expose a suite of z-endpoints to make it easier for users to debug their components. As of 1.32, these endpoints only support plain text format and are strictly to be used for human inspection to gain real time debugging information of a component binary. Avoid automated scraping of data returned by these endpoints since they are introduced as alpha features and their format may change in future releases. + + + +## z-pages + +Kubernetes now includes "z-pages" to help you troubleshoot problems with its core control plane components. These special debugging endpoints provide internal information about running components. Currently we have the following endpoints: + +- [z-pages](#z-pages) + - [statusz](#statusz) + - [flagz](#flagz) + +### statusz + +Enabled using the ComponentStatusz feature gate, statusz endpoint displays the high level information about the component such as its Kubernetes version, emulation version, start time and more. + +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+5eeac4f21a491b-dirty +Emulation version: 1.32.0-alpha.0.1484 +``` + +### flagz + +Enabled using the ComponentFlagz feature gate, the flagz endpoint shows you the command line flags that were used to start a component. + +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 +```