kubectl command builder

Build kubectl commands for logs, exec, port-forward, rollouts, debugging and more, with each flag explained.

Runs locally. Nothing you paste leaves this tab.

    Habits that save time

    • Always pass --context in scripts and runbooks. The current context is the most common cause of “I ran it against prod”.
    • kubectl logs deploy/api picks one pod. Use -l app=api --prefix to see all of them.
    • --previous shows the logs of the container that crashed, which is what you need for CrashLoopBackOff.
    • kubectl debug adds a throwaway container with tools to a running pod, so distroless images stay distroless.

    View this tool’s source · Report a problem

    Support on Ko-fi