A simple way of debugging your k8s
app using a lightweight container using Kubernetes debug ephemeral containers. It gathers the following data:
- top
- lsof
- vmstat
- iostat
- nfsiostat
- nfsstat
docker build -t jandroavicloud/performance-debugger .
docker tag jandroavicloud/performance-debugger jandroavicloud/performance-debugger:latest
docker push jandroavicloud/performance-debugger:latest
FROM alpine:3.15.5
RUN apk add --no-cache \
lsof \
nethogs \
procps \
nfs-utils \
tcpdump
RUN mkdir -p /scripts
COPY performance.sh /scripts
WORKDIR /scripts
RUN chmod +x performance.sh
CMD ["sh", "/scripts/performance.sh"]
usage: run_performance_collection.sh <pod_name>
sh run_performance_collection.sh busybox default