Armyknife

Armyknife

spectroman
spectroman
10 views

Armyknife

Minimal network debugging pod for Kubernetes. Packages common network tools into a long-running container for ad-hoc cluster troubleshooting.

You might know the DNS-Utils pod / container that you can install in your cluster to make tests and debug.

Well, I find that incredibly insufficient and it could contain any or all tools we would need to be able to test different things.

Imagine that you might have your on in-house tools that you would want to carry to pod to also make debugging , testing and whatever you can imagine.

This is the method you can use to deploy a versatile container , one that you could install new things and be free to do whatever you want.

You should perhaps be also cautious to leave such pod accessible, because it could / would allow some bad actor to execute harmful things as well. This should be always considered, even if your cluster in "internal", bare-metal and isolated. This can be dangerous, so be careful and know your actions :D

Tools included by default

  • ping, telnet, traceroute (inetutils)
  • mtr — combined ping/traceroute
  • dig, nslookup, host (dnsutils)
  • curl, wget

Usage

Deploy pod to cluster:

kubectl apply -f armyknife.yaml

Exec into it:

kubectl exec -it armyknife -- bash

Delete when done:

kubectl delete -f armyknife.yaml

Pod deploys to the default namespace. Edit armyknife.yaml to change.

Build

docker build -t armyknife .

Image is based on debian:13 (trixie).

CI/CD

GitLab CI pipeline has two stages:

Stage Job Trigger
lint yamllint — validates all .yaml files push
build armyknife-build — builds and pushes Docker image to registry manual

Image is pushed to registry.juliochegedus.com/spectronet/armyknife.

CI variables required:

  • CI_REGISTRY_USER
  • CI_REGISTRY_PASSWORD

Related Posts

ETCD Cronjobs
Kuberneteslinuxinfra

ETCD Cronjobs

All the necessary cronjobs you need to run, to maintain a Kubernetes Cluster and have disaster recovery

3/31/2026Read More →