Skip to content

Commit

Permalink
[site] Added pprof doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Stuchinskii committed Jul 21, 2023
1 parent 8dccf52 commit 51c3a8c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions site/content/en/docs/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ data:
waitForPodsReady:
enable: true
timeout: 10m
# pprofBindAddress: :8082
integrations:
frameworks:
- "batch/job"
Expand Down
2 changes: 2 additions & 0 deletions site/content/en/docs/tasks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
47 changes: 47 additions & 0 deletions site/content/en/docs/tasks/enabling_pprof_endpoints.md
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit 51c3a8c

Please sign in to comment.