Skip to content

Latest commit

 

History

History
110 lines (99 loc) · 3.19 KB

README.md

File metadata and controls

110 lines (99 loc) · 3.19 KB

Python KoolKit

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 Python KoolKit you can spin up a IPython or a memory profiler your Kubernetes pods without any configuration or extra 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 python KoolKit with your pod:

kk <POD-NAME> python <DEPLOYMENT-NAME>

The Python KoolKit contains the following Python utilities (available on $PATH wherever applicable):

  • pyenv - A Python version manager with Python 3.10.2 installed as the default Python version.
  • ipdb - An interactive debugger with pdb's functionality and ipython support.
  • ipython - A powerful, interactive Python command shell.
  • line_profiler - Line-by-line profiling for Python.
  • lptrace - Trace any Python program, anywhere!
  • memory_profiler - Monitor Memory usage of Python code.
  • pdbpp - A drop-in replacement for pdb.
  • pudb - A full-screen console debugger for Python.
  • pyinstrument - Call stack profiler for Python.
  • scalene - A high-performance, high-precision CPU, GPU, and memory profiler for Python.
  • vprof - A visual profiler for Python.
  • py-heat-magic - IPython magic command to profile and view your python code as a heat map.
  • py-spy - A sampling profiler for Python programs.

In addition, it contains the following utilities on top of the official ubuntu:20.04 image:

bird
build-essential
ca-certificates
calicoctl
conntrack
ctop
curl
dhcping
dnsutils
fping
gdb
git
htop
httpie
iftop
iperf
iproute2
ipset
iptraf-ng
iputils-ping
ipvsadm
jq
ldnsutils
libbz2-dev
libedit-dev
libffi-dev
liblzma-dev
libncursesw5-dev
liboping-dev
libreadline-dev
libsqlite3-dev
libssl-dev
libxml2-dev
libxmlsec1-dev
linux-tools-common
llvm
mongo
mtr
mycli
mysql-client
netcat
netgen
nftables
ngrep
nmap
pgcli
postgresql-client
redis-tools
scapy
socat
software-properties-common
strace
tcpdump
tcptraceroute
termshark
tk-dev
tmux
tshark
unzip
vim
websocat
wget
wuzz
xz-utils
zip
zlib1g-dev