command
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Feb 11, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
kubectl-ran
A Kubernetes addon for running an ephemeral container with a "mounted" volume.
Example:
mkdir -p ./stuff
echo "Test suite" > ./stuff/in.txt
kubectl ran busybox -e VAR1=Hello -e VAR2=world -v ./stuff:/stuff -- sh -c 'cp /stuff/in.txt /stuff/out.txt && echo "$VAR1 $VAR2" >> /stuff/out.txt'
cat ./stuff/out.txt
It works by
- Starting a container with
tail -f /dev/null
in a new pod. You can optionally specify environment variables.
- Copies any "mounted" volumes into the container.
- Runs the specified command.
- Copies the "mounted" volumes back out of the container.
- Deletes the pod.
Requires the image contain tail
and tar
.
Limitations:
- Volumes must be directories
- Source and destination basename for volumes must match. Source will be copied into the dirname of the destination.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
pkg
|
|
|
|
Click to show internal directories.
Click to hide internal directories.