Skip to Content
This project is a work in progress. If you have any questions or suggestions, feel free to contact me.
KubernetesTroubleshoot: Using BusyBox

Troubleshoot: Using BusyBox

To check if your application is working using BusyBox in Kubernetes, you can use BusyBox as a test pod to:

  • Ping your app
  • Curl a service
  • Test DNS resolution
  • Access internal services

Step-by-Step: Use BusyBox to Check Your Application

Run a BusyBox Pod

kubectl run busybox --image=busybox:1.28 --restart=Never -it -- sh

This command will:

  • Create a one-off pod using the BusyBox image
  • Open an interactive shell in that pod

If you’re using Minikube and want DNS working, ensure coredns is running (kubectl get pods -n kube-system).

Use BusyBox to Test Connectivity

Once you’re inside the pod shell:

troubleshoot_busybox.sh
# Ping a service by name (replace with your app service) ping my-service-name # Or test with wget if available wget http://my-service-name # If using curl (BusyBox must be built with it) curl http://my-service-name:port # DNS test nslookup my-service-name

Exit the Pod

exit

Then delete the pod:

kubectl delete pod busybox

Tip: Use --namespace if your app is not in default

kubectl run busybox -n my-namespace --image=busybox:1.28 --restart=Never -it -- sh
Last updated on