Crates.io | kubectl-distribute |
lib.rs | kubectl-distribute |
version | 0.1.0 |
source | src |
created_at | 2023-02-01 03:18:05.914723 |
updated_at | 2023-02-01 03:18:05.914723 |
description | Distribute a file to multiple Kubernetes pods via label selector |
homepage | |
repository | https://github.com/cadwallion/kubectl-distribute/ |
max_upload_size | |
id | 773222 |
size | 53,034 |
A helper program/kubectl plugin designed to handle the distribution of a file to multiple pods based upon a label selector. kubectl-distribute
queries for all pods matching a specific label (as specified by -l
flag) with an array of values (as specified by -v
flag(s)), then copies the file (as specified by -f
flag) to the destination path (as specified by -p
flag) within the matching pod containers.
Usage: kubectl-distribute [OPTIONS] --file <FILE> --path <PATH>
Options:
-v, --value <VALUE> The pod label value(s) used to select pods for distribution
-f, --file <FILE> The file to distribute to the selected pods
-p, --path <PATH> The path in each of the pods to distribute the file
-l, --label <LABEL> The label key, used to select pods for distribution [default: app]
-h, --help Print help
-V, --version Print version
# Copy hello.txt to /data/config in all pods that match the label "app=rest-api"
# kubectl-distribute -v rest-api -f hello.txt -p /data/config
# Copy hello.txt to /data/config in all pods with a label "app" matching "rest-api" or "soap-api"
# kubectl-distribute -v rest-api -v soap-api -f hello.txt -p /data/config
# The real reason this thing exists; copy a Minecraft plugin to all Minecraft deployments in the cluster :D
# kubectl-distribute -f minecraft-plugin.jar -p /data/plugins -v mc-survival -v mc-creative -v mc-lobby