A command-line tool that provides a Docker-like interface for Kubernetes operations
Project description
Kodman
A command-line tool that provides a Docker-like experience with a Kubernetes backend.
An example use case would be to facilitate a single CI script where the runner may sometimes be a host with Docker (possibly run locally) and other times a Kubernetes executor where Docker-in-Docker is not possible (such as a Gitlab runner).
Source | https://github.com/epics-containers/Kodman |
---|---|
PyPI | pip install kodman |
Releases | https://github.com/epics-containers/Kodman/releases |
Some examples:
Hello-world:
kodman run --rm hello-world
Handling exit codes:
kodman run --entrypoint bash --rm ubuntu -c "echo Enter; exit 1" && echo "You shall not pass"
Add files or directories into the pod filesystem:
mkdir demo
echo "Mellon" > demo/token.txt
kodman run -v ./demo:/demo --rm ubuntu bash -c "cat demo/token.txt"
Usage:
From outside of the cluster kodman
will use your current Kubernetes context (the same as your current kubectl
context).
From inside the cluster kodman
will use the serviceAccount mounted by default.
Permissions
A minimal Kubernetes RBAC role definition can be found in .github/manifests
Design decisions
Why argparse over click/typer?
The docker cli api is not POSIX compliant.
For example: docker run --network=host imageID dnf -y install java
Click/Typer does not allow this (and is correct). They would expect: docker run --network=host imageID -- dnf -y install java
See Section 12.2 Guideline 10 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kodman-1.1.0.tar.gz
.
File metadata
- Download URL: kodman-1.1.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbcc2d04b5188242f7becd2d805a0f97b2cb8466a116290ebe99929097fd8eff |
|
MD5 | 7acc453a1a06cbf602ede4328a06789e |
|
BLAKE2b-256 | 027b5ed4b8f45fb8d0ccdac4d0973b7861abcc676d7ecc30f074660378e4763c |
File details
Details for the file kodman-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: kodman-1.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abb43acab7f6d85e5500dd846b9ecd847cfff59e31a4f4a871ab96d8d3c75416 |
|
MD5 | 0ee8e384151ac7ecdd24656ab9b2ae11 |
|
BLAKE2b-256 | 2854159e53b2e602d9c7cbcd0f2a18d3d69db753b2e1c876d22b9214d32cd526 |