You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here.

New to Voyager? Please start here.

Profiling Voyager operator

Voyager operator serves runtime profiling data in the format expected by the pprof visualization tool on port :8443. The handled paths all begin with /debug/pprof/.

Follow the steps below to expose profiling data:

  1. Give system:anonymous user access to /debug/pprof/ paths. This is not safe to do on a production cluster.
kind: ClusterRole
  name: appscode:system:profiler
- nonResourceURLs: ["/debug/pprof/", "/debug/pprof/*"]
  verbs: ["get", "post"]
kind: ClusterRoleBinding
  name: appscode:system:profiler
  kind: ClusterRole
  name: appscode:system:profiler
- apiGroup:
  kind: User
  name: system:anonymous
$ kubectl auth reconcile -f docs/examples/monitoring/profiler.yaml "appscode:system:profiler" reconciled "appscode:system:profiler" reconciled
  1. Now, forward the port :8443 to your workstation.
$ kubectl get pods -n voyager | grep voyager
voyager-operator-f89dcccdb-plvmt        1/1       Running   0          27m

$ kubectl port-forward -n voyager voyager-operator-f89dcccdb-plvmt 8443
Forwarding from -> 8443
Forwarding from [::1]:8443 -> 8443
  1. Now, visit the url:


To look at a 30-second CPU profile:

$ go tool pprof https+insecure://localhost:8443/debug/pprof/profile
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top10
(pprof) pdf

To look at the heap profile:

$ go tool pprof https+insecure://localhost:8443/debug/pprof/heap
(pprof) top10
(pprof) pdf
  1. Once you are done, remove access to system:anonymous user.
$ kubectl delete -f docs/examples/monitoring/profiler.yaml "appscode:system:profiler" deleted "appscode:system:profiler" deleted