Skip to content

st-vasyl/debug-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Debug container

This repository consits of docker image with a bunch of tools to make easier debuging processes in Kubernetes clusters. There're amd64 and arm64 architectures available on the same image tag.

Software list

Kubernetes:

  • kubectl
  • consul
  • vault
  • helm

Amazon:

  • awscli

gRPC:

  • grpcurl
  • grpc_health_probe
  • ghz

Network:

  • dig
  • nslookup
  • netcat
  • telnet
  • netstat
  • ifconfig
  • route
  • nmap
  • wget
  • curl

Other:

  • python
  • unzip
  • vim
  • jq
  • git
  • gcc/g++

Usage

The most common workflow is to run

kubectl run debug-container --image-pull-policy=Always --image=stvasyl/debug-container:latest --restart=Never -- sleep 1d

When pod become started

kubectl exec --container debug-container -ti debug-container -- /bin/bash

You also may add --overrides='{"spec":{"serviceAccountName":"'serviceaccount-name'"}}' to debug serviceaccount related issues.

In case if you need to add securityContext with capabilities try to use template like this:

apiVersion: v1
kind: Pod
metadata:
  name: debug-container
spec:
  # serviceAccountName: service-account-name
  restartPolicy: Never
  containers:
    - name: debug-container
      image: "stvasyl/debug-container:latest"
      imagePullPolicy: Always
      command:
        - /bin/sleep
        - "1d"
      securityContext:
        capabilities:
          add:
            - IPC_LOCK # add more if you need
      resources:
        limits:
          cpu: 200m
          memory: 256Mi
        requests:
          cpu: 100m
          memory: 128Mi

About

Kubernetes debug docker image

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published