From 51c3a8c61a8075e530809d522d6a74970f50c6c2 Mon Sep 17 00:00:00 2001 From: Anton Stuchinskii Date: Thu, 20 Jul 2023 13:43:33 +0200 Subject: [PATCH] [site] Added pprof doc --- site/content/en/docs/installation/_index.md | 1 + site/content/en/docs/tasks/_index.md | 2 + .../en/docs/tasks/enabling_pprof_endpoints.md | 47 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 site/content/en/docs/tasks/enabling_pprof_endpoints.md diff --git a/site/content/en/docs/installation/_index.md b/site/content/en/docs/installation/_index.md index e539471563..7fb933b0a9 100644 --- a/site/content/en/docs/installation/_index.md +++ b/site/content/en/docs/installation/_index.md @@ -105,6 +105,7 @@ data: waitForPodsReady: enable: true timeout: 10m + # pprofBindAddress: :8082 integrations: frameworks: - "batch/job" diff --git a/site/content/en/docs/tasks/_index.md b/site/content/en/docs/tasks/_index.md index 865aedc4eb..2badbbf4b8 100755 --- a/site/content/en/docs/tasks/_index.md +++ b/site/content/en/docs/tasks/_index.md @@ -23,6 +23,8 @@ quotas and queues. [administer cluster quotas](/docs/tasks/administer_cluster_quotas) with ClusterQueues and LocalQueues. - As a batch administrator, you can learn how to setup [Sequential Admission with Ready Pods](/docs/tasks/setup_sequential_admission). +- As a batch administrator, you can learn how to enable + [pprof endpoints](/docs/tasks/enabling_pprof_endpoints). ### Batch user diff --git a/site/content/en/docs/tasks/enabling_pprof_endpoints.md b/site/content/en/docs/tasks/enabling_pprof_endpoints.md new file mode 100644 index 0000000000..268278a64a --- /dev/null +++ b/site/content/en/docs/tasks/enabling_pprof_endpoints.md @@ -0,0 +1,47 @@ +--- +title: "Enabling pprof endpoints" +date: 2023-07-21 +weight: 3 +description: > + Enable pprof endpoints for Kueue controller manager. +--- + +This page shows you how to enable pprof endpoints for Kueue controller manager. + +The intended audience for this page are [batch administrators](/docs/tasks#batch-administrator). + +## Before you begin + +Make sure the following conditions are met: + +- A Kubernetes cluster is running. +- The kubectl command-line tool has communication with your cluster. +- [Kueue is installed](/docs/installation). + +## Enabling pprof endpoints + +> _Available in Kueue v0.5.0 and later_ + +To enable pprof endpoints, you need to set a `pprofBindAddress` is set in the [manager's configuration](/docs/installation/#install-a-custom-configured-released-version). + +The easiest way to reach pprof port in kubernetes is to use `port-forward` command. + +1. Run the following command to obtain the name of the Pod running Kueue: + +```shell +kubectl get pod -n kueue-system +NAME READY STATUS RESTARTS AGE +kueue-controller-manager-769f96b5dc-87sf2 2/2 Running 0 45s +``` + +2. Run the following command to initiate the port forwarding to your localhost: + +```shell +kubectl port-forward kueue-controller-manager-769f96b5dc-87sf2 -n kueue-system 8082:8082 +Forwarding from 127.0.0.1:8082 -> 8082 +Forwarding from [::1]:8082 -> 8082 +``` + +The HTTP endpoint will now be available as a local port. + +To learn how to use the exposed endpoint, see [pprof basic usage](https://github.com/google/pprof#basic-usage) and [examples](https://pkg.go.dev/net/http/pprof#hdr-Usage_examples).