Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

121 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build
docker-pull

KDBG image

KDBG (Kubernetes Debuger) is a small docker container based on lastest Alpine Linux image, used for debugging Kubernetes clusters from inside a pod.

This image is built to be small (~20MB) and efficient.

Build locally

docker build -t kdbg .

Pull from DockerHub

docker pull nvucinic/kdbg

Usage

Run as an interactive pod in your Kubernetes cluster:

kubectl run -it --rm=true kdbg --restart=Never --image=nvucinic/kdbg --  /bin/sh

Run on a specific node in your Kubernetes cluster:

kubectl run -it --rm=true kdbg --restart=Never --image=nvucinic/kdbg --  /bin/sh --overrides='
{
  "apiVersion": "v1",
  "spec": {
    "nodeSelector": {
      "kubernetes.io/hostname": "NODENAME"
    }
  }
}'

Run commands directly from kdbg container:

kubectl run -it --rm=true kdbg --restart=Never --image=nvucinic/kdbg -- nslookup kubernetes

Server:		10.96.0.10
Address:	10.96.0.10#53

Name:	kubernetes.default.svc.cluster.local
Address: 10.96.0.1

kubectl run -it --rm=true kdbg --restart=Never --image=nvucinic/kdbg  -- ping -c 5 "google.com"

64 bytes from mil07s08-in-f14.1e100.net (216.58.206.78): icmp_seq=2 ttl=50 time=28.0 ms
64 bytes from mil07s08-in-f14.1e100.net (216.58.206.78): icmp_seq=3 ttl=50 time=26.1 ms
64 bytes from mil07s08-in-f14.1e100.net (216.58.206.78): icmp_seq=4 ttl=50 time=30.3 ms
64 bytes from mil07s08-in-f14.1e100.net (216.58.206.78): icmp_seq=5 ttl=50 time=28.9 ms

--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 9ms
rtt min/avg/max/mdev = 26.059/27.878/30.253/1.629 ms

Tools:

Tools included in kdbg image:

bash
curl
iputils
mtr
iptraf-ng
netcat
socat
...

Contributing

Pull requests are welcome.

For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Small Kubernetes debugging container

Resources

Stars

36 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages