Hacker News new | past | comments | ask | show | jobs | submit login

One useful debugging trick I use often is to edit a deployment or pod via `kubectl edit` and update the command to be `tail -f /dev/null`

e.g.,

    spec:
      containers:
      - command:
        - bash
        - -c
        - tail -f /dev/null
(and comment out any liveness or readiness probes)

Very useful to then `exec` with a shell in the pod debug things or test out different configs quickly, check the environment etc.




Nice trick, I usually use sleep 10000000 as the command.


"sleep infinity" works on GNU coreutils as well as recent versions of busybox (which is what Alpine uses as coreutils).


"recent" = BusyBox 1.31 (October 2019) or newer; for inclusion in Alpine 3.11 (December 2019) or newer.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: