Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1006 Bytes

File metadata and controls

46 lines (34 loc) · 1006 Bytes

🦉 Whats is this?

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

🏗️ build_image.sh

docker build -t jandroavicloud/performance-debugger .
docker tag jandroavicloud/performance-debugger jandroavicloud/performance-debugger:latest
docker push jandroavicloud/performance-debugger:latest

🐳 Dockerfile

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"]

🧪 Test it

usage: run_performance_collection.sh <pod_name>

 sh run_performance_collection.sh busybox default