debug failed pod

Wed, Feb 8, 2023 One-minute read

debug failed pod

I was trying to debug a python job which created a pod using a bunch of argparse arguments.

This is how I figured out how to run all the python args and if it failed throw a sleep in bash. This then let me jump in and see what was actually happening on the container.

appreviated

# truncated
    command: ["bash", "-c"]
    args:
      - >-
                python script.py -l foo -b far || sleep 10000;
# truncated

ref: https://devops.stackexchange.com/a/15184/34192

Tags:

#kubernetes #til #debug