
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
A CLI tool for launching Kubernetes jobs with environment variable and secret management.
curl -LsSf https://astral.sh/uv/install.sh | sh
Alternatively, you can install uv
using pip:
pip install uv
uvx
to use the cli (the uvx
command invokes a tool without installing it to the local .venv):uvx kblaunch --help
When using the kblaunch
command always prepend with uvx
command.
Run the setup command to configure the tool (email and slack webhook):
uvx kblaunch setup
This will go through the following steps:
/pvc
.The outcome of kblaunch setup
is a .json
file stored in `.cache/.kblaunch/config.json. It should look something like this:
{
"email": "XXX@ed.ac.uk",
"user": "sXXX-infk8s",
"slack_webhook": "https://hooks.slack.com/services/XXX/XXX/XXX",
"default_pvc": "sXXX-infk8s-pvc",
"git_secret": "sXXX-infk8s-git-ssh"
}
When you later use kblaunch
to launch a job, it will use the values stored in that config.json.
Launch a simple job:
uvx kblaunch launch
--job-name myjob \
--command "python script.py"
From local environment:
export PATH=...
export OPENAI_API_KEY=...
# pass the environment variables to the job
kblaunch launch \
--job-name myjob \
--command "python script.py" \
--local-env-vars PATH,OPENAI_API_KEY
From Kubernetes secrets:
uvx kblaunch launch \
--job-name myjob \
--command "python script.py" \
--secrets-env-vars mysecret1,mysecret2
From .env file (default behavior):
uvx kblaunch launch \
--job-name myjob \
--command "python script.py" \
--load-dotenv
If a .env exists in the current directory, it will be loaded and passed as environment variables to the job.
Specify GPU requirements:
uvx kblaunch launch \
--job-name gpu-job \
--command "python train.py" \
--gpu-limit 2 \
--gpu-product "NVIDIA-A100-SXM4-80GB"
Launch an interactive job:
uvx kblaunch launch \
--job-name interactive \
--interactive
Launch command options:
--email
: User email (overrides config)--job-name
: Name of the Kubernetes job [required]--docker-image
: Docker image (default: "nvcr.io/nvidia/cuda:12.0.0-devel-ubuntu22.04")--namespace
: Kubernetes namespace (default: $KUBE_NAMESPACE)--queue-name
: Kueue queue name (default: $KUBE_QUEUE_NAME)--interactive
: Run in interactive mode (default: False)--command
: Command to run in the container [required if not interactive]--cpu-request
: CPU request (default: "1")--ram-request
: RAM request (default: "8Gi")--gpu-limit
: GPU limit (default: 1)--gpu-product
: GPU product type (default: "NVIDIA-A100-SXM4-40GB")
--secrets-env-vars
: List of secret environment variables (default: [])--local-env-vars
: List of local environment variables (default: [])--load-dotenv
: Load environment variables from .env file (default: True)--nfs-server
: NFS server address (default: set to environment variable $INFK8S_NFS_SERVER_IP)--pvc-name
: Persistent Volume Claim name (default: default_pvc
if present in config.json
)--dry-run
: Print job YAML without creating it (default: False)--priority
: Priority class name (default: "default")
default
, batch
, short
--vscode
: Install VS Code CLI in container (default: False)--tunnel
: Start VS Code SSH tunnel on startup (requires $SLACK_WEBHOOK
and --vscode flag)--startup-script
: Path to startup script to run in containerMonitor command options:
--namespace
: Kubernetes namespace (default: $KUBE_NAMESPACE)The kblaunch monitor
command provides several subcommands to monitor cluster resources:
Displays aggregate GPU statistics for the cluster:
uvx kblaunch monitor gpus
Displays queued jobs (jobs which are waiting for GPUs):
uvx kblaunch monitor queue
Displays per-user statistics:
uvx kblaunch monitor users
Displays per-job statistics:
uvx kblaunch monitor jobs
Note that users
and jobs
commands will run nvidia-smi
on pods to obtain GPU usage is not recommended for frequent use.
FAQs
A CLI tool for launching Kubernetes job fast in EIDF
We found that kblaunch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.