generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1003 from epam/pprof-docs
[site] Added pprof doc
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |