This small project provides a Pod Autodiscovery example based on
github.com/elastic/elastic-agent-autodiscover
library.
docker build -t k8sdiscovery .
docker tag k8sdiscovery:latest chrismark/k8sdiscovery:v0.0.1
docker tag k8sdiscovery:latest chrismark/k8sdiscovery:v0.0.1
docker push chrismark/k8sdiscovery:v0.0.1
kind load docker-image chrismark/k8sdiscovery:v0.0.1
And uncomment the imagePullPolicy: Never
inside the manifest
kubectl apply -f k8sdiscovery-kubernetes.yml
kubectl -n kube-system port-forward pod/k8sdiscovery 6060:6060
After having deployed everything on the cluster, run the following command to
take the heap profile of the program:
1go tool pprof -png http://localhost:6060/debug/pprof/heap > out.png
In order to take profiles over time run:
bash profiler.sh
and check the profiles stored under /profiles
directory.