Kubernetes Debug Pod

To verify network configurations of a Kubernetes deployment, we use a  simple debug Pod.

apiVersion: v1
kind: Pod
metadata:
  name: debug-debian
  labels:
    app: debug-debian
spec:
  enableServiceLinks: false
  containers:
    - name: debug-debian
      image: debian:10
      command:
        - /bin/bash
        - -ec
        - |
          apt update -qq
          apt install -qq -y wget curl telnet dnsutils openssh-client nano vim htop traceroute
          tail -f /dev/null
      resources:
        limits:
          cpu: 1000m
          memory: 2000Mi
        requests:
          cpu: 10m
          memory: 20Mi

After deploying the pod can be accessed with Kubectl exec.

kubectl exec --stdin --tty debug-debian -- /bin/bash