Skip to content

Instantly share code, notes, and snippets.

@mpaloni
Last active January 16, 2025 13:53
Show Gist options
  • Save mpaloni/849a53881f8e646433178387027d9f07 to your computer and use it in GitHub Desktop.
Save mpaloni/849a53881f8e646433178387027d9f07 to your computer and use it in GitHub Desktop.
kube

Create a workload for debugging

kubectl run python-workload --image=python:3.12-slim --restart=Never --command -- /bin/bash -c "sleep 3600"

Run exec in default namespace, optionally add --namespace my-namespace to assing namespace

kubectl exec -it python-workload -- /bin/bash

Delete the workload after

kubectl delete pod python-workload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment