Simple and small container env for development and debug purposes.
By default, the container starts as a regular user, to play nice with potential Kubernetes admission policies. Therefor, the a set of most useful packages is already installed, while keeping an eye on the container image size. The package list is not exhaustive, but can be extended by using the binenv
tool. Run binenv to install various packages, by running binenv update
, binenv search
and binenv install <pkg>
.
Imperative and removed on exit:
kubectl run -it --rm --restart=Never --image=ghcr.io/mpepping/podshell:latest shell
Declarative:
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
labels:
run: shell
name: shell
spec:
containers:
- image: ghcr.io/mpepping/podshell:latest
imagePullPolicy: Always
name: shell
command: ["sleep"]
args: ["86400"]
EOF
As a Deployment:
kubectl create deployment shell --image=ghcr.io/mpepping/podshell:latest -- sleep infinit
Or in docker or podman:
docker run -ti --rm ghcr.io/mpepping/podshell:latest ||\
podman run -ti --rm ghcr.io/mpepping/podshell:latest
Open an issue or PR.