KoolKits (Kubernetes toolkits) are language-specific container images, that contain a (highly-opinionated) set of tools for debugging applications running in Kubernetes pods. You can read more about KoolKits here or learn about the motivation behind this project here.
Using the JVM KoolKit you can use async-profiler
,jmxterm
or VisualVM with any JVM running inside your Kubernetes pods, without any extra configuration or setup.
To get started, first add the shorthand kk
command to your shell by pasting the following snippet into your shell:
echo "## KoolKits - Shorthand
kk() {
kubectl debug -it $1 --image=lightruncom/koolkits:$2 --image-pull-policy=Never --target=$3
}" >> ~/.bashrc
source ~/.bashrc
Then run the JVM KoolKit with your pod:
kk <POD-NAME> jvm <DEPLOYMENT-NAME>
The JVM KoolKit contains the following Java utilities (available on $PATH
wherever applicable):
sdk
- SDKMAN!, A JVM version manager (and extras!) with Adoptium Temurin (AdoptOpenJDK) 17.0.2 - installed as the default JDK.jmxterm
- Interactive command-line JMX client.honest-profiler
- A sampling JVM profiler without the safepoint sample bias.jmxtrans
- The missing connector between speaking to a JVM via JMX on one end and whatever logging / monitoring / graphing package that you can dream up on the other end.async-profiler
- Sampling CPU and HEAP profiler for Java featuringAsyncGetCallTrace
+perf_events
.VisualVM
(CLI) - A profiler that bundles up a combination of JDK command line tools.Maven
- The default build tool for the JVM world.
In addition, it contains the following utilities on top of the official ubuntu:20.04
image:
bird
calicoctl
conntrack
ctop
curl
dhcping
dnsutils
fping
gdb
htop
httpie
iftop
iperf
ipset
iptraf-ng
iproute2
iputils-ping
ipvsadm
jq
ldnsutils
liboping-dev
linux-tools-common
maven
mongo
mtr
mycli
mysql-client
netcat
netgen
nftables
ngrep
nmap
pgcli
postgresql-client
redis-tools
scapy
socat
software-properties-common
strace
tcpdump
tcptraceroute
termshark
tmux
tshark
unzip
vim
websocat
wuzz
zip