Skip to content

PodShell is a small OCI compatibel container image for development and debug purposes

Notifications You must be signed in to change notification settings

mpepping/podshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

podshell

Open in GitHub Codespaces

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>.

Usage

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

Feedback

Open an issue or PR.