The debug/pprof
paths provided by the Go profiling tool (pprof
) expose several types of profiling data, which are essential for diagnosing performance issues in applications, particularly those written in Go (including many Kubernetes components). Here’s a rundown of what each of the primary pprof
profiles represents and who typically uses and understands them:
CPU Profile (/debug/pprof/profile
):
Heap Profile (/debug/pprof/heap
):
Goroutine Profile (/debug/pprof/goroutine
):
Block Profile (/debug/pprof/block
):
Threadcreate Profile (/debug/pprof/threadcreate
):
apiVersion: v1
kind: Pod
metadata:
annotations:
kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: x.x.x.x:6443
creationTimestamp: null
labels:
component: kube-apiserver
tier: control-plane
name: kube-apiserver
namespace: kube-system
spec:
containers:
- command:
- kube-apiserver
- --advertise-address=x.x.x.x
- --allow-privileged=true
#- --profiling=false
- --authorization-mode=Node,RBAC
- --client-ca-file=/etc/kubernetes/pki/ca.crt
$ kubectl proxy &
$ go tool pprof http://localhost:8001/api/v1/nodes/{NODE-NAME}/proxy/debug/pprof/profile
İletişime geçmek, yorum bırakmak veya hatalarımı düzetlmek istersen mail atabilirsin.