Troubleshooting container with lots of tools installed.
Supported architectures:
- amd64 (x86_64)
- arm64 (aarch64)
Container is available on docker hub: https://hub.docker.com/r/iptizer/swiss
kubectl run -it --restart=Never --rm --image=iptizer/swiss swiss
Deployment/ daemonset within this repo may be used. There are two versions provided:
- Deployment: swiss
- DaemonSet: swiss-host (Extended privileges with host mounted on pod. Use with caution!)
kubectl create ns troubleshoot
# daemonset
kubectl apply -n troubleshoot -f daemonset.yaml
kubectl get po -n troubleshoot
kubectl exec -it swiss-577np -- bash
kubectl delete -f daemonset.yaml
# deploy - Copy & paste will work
kubectl apply -n troubleshoot -f deployment.yaml
kubectl scale -n troubleshoot --replicas=1 deploy/swiss
kubectl wait -n troubleshoot --timeout=600s --for=condition=available deploy/swiss && \
kubectl exec -n troubleshoot -it $( k get po -l "app=swiss" -o jsonpath='{.items[0].metadata.name}' )
kubectl scale -n troubleshoot --replicas=0 deploy/swiss
kubectl delete -f deployment.yaml
# job
kubectl apply -n troubleshoot -f job.yaml
docker run -it --rm iptizer/swiss -- /bin/bash
Including Proxy:
HTTP_PROXY="http://my.proxy"
NO_PROXY="127.0.0.1,localhost"
docker run --rm --env HTTP_PROXY=${HTTP_PROXY} --env HTTPS_PROXY=${HTTP_PROXY} --env http_proxy=${HTTP_PROXY} --env https_proxy=${HTTP_PROXY} --env NO_PROXY=${NO_PROXY} --env no_proxy=${NO_PROXY} -it iptizer/swiss
Both architectures:
docker login
docker buildx build --push --platform linux/arm64,linux/amd64 -t iptizer/swiss:latest .
Only arm64:
docker build . -t iptizer/swiss:latest
docker push iptizer/swiss:latest
To start the local devbox and install new packages proceed as follows:
devbox shell
To debug disc space on a node, use swiss-host. We can then attach to the pod on the host we are interested, use ncdu and hopefully find the problem.
Connect to a swiss pod and use tmux to jump whereever you want.