Workload Management
Everything you do to workloads lives under one command family: ksail workload. The subcommands
follow familiar kubectl and Helm patterns, so existing muscle memory transfers — and because the
tooling is embedded, there is nothing else to install.
ksail workload get podsksail workload logs deployment/nginx -fksail workload gen deployment my-app --image=nginx --port=80Two ways to deploy
Section titled “Two ways to deploy”There are two ways to get manifests onto a cluster. Pick by what you’re doing, not by preference.
-
Imperative — for learning and the inner loop. Apply a directory straight at the cluster and iterate:
Terminal window ksail workload apply -k ./k8sThis is the quickest way to push manifests while you experiment. Pair it with
watchto auto-apply on every file save. -
GitOps — recommended for real environments. Your manifests are the source of truth: KSail compiles your source directory into a versioned OCI artifact, and Flux or ArgoCD reconciles the cluster to match.
Terminal window ksail workload push # compile the source dir and push the OCI artifactksail workload reconcile # tell the GitOps engine to pull and apply
Inspect and debug
Section titled “Inspect and debug”Day-2 commands work against whatever your kubeconfig points at, no matter how the workload got there:
ksail workload get pods # list resourcesksail workload describe pod/nginx-abc123 # full status and eventsksail workload logs deployment/nginx -f # stream logs (-f to follow)ksail workload exec deployment/nginx -- sh # run a command in a containerksail workload explain deployment.spec # API field documentationTo block until something is ready — handy in scripts and CI:
ksail workload wait deployment/nginx --for=condition=availableksail workload watch # live view of resources as they changeOperate
Section titled “Operate”Scale and manage rollouts the way you already know:
ksail workload scale deployment/nginx --replicas=3ksail workload rollout status deployment/nginxksail workload rollout restart deployment/nginxksail workload rollout undo deployment/nginxScaffold new manifests with gen instead of writing YAML
from scratch:
ksail workload gen deployment my-app --image=nginx --port=80 > k8s/my-app.yamlRun one service locally
Section titled “Run one service locally”Use ksail workload intercept when you want a process on your machine to serve one Deployment’s
live inbound traffic while its cluster dependencies stay in place. The command redirects one pod’s
TCP port for the duration of the session and restores the pod’s remote traffic handling on Ctrl-C.
Follow the Local Service Intercepts guide for a complete example,
including an in-cluster traffic client, the local process, port selection, and cleanup. Use
workload mirror instead when you only need a read-only copy.
Check before you ship
Section titled “Check before you ship”ksail workload validate and ksail workload scan inspect your manifests fully offline, without a
cluster — which makes them an ideal CI gate:
ksail workload validate # schema validation + Flux ${VAR} substitution expansionksail workload scan # security posture via Kubescape (NSA, MITRE, and more)See Validate configuration for how ${VAR} substitution is
expanded during validation.
Move images around
Section titled “Move images around”Beyond push/reconcile, the workload family also handles container images and secrets:
| Command | What it does |
|---|---|
images |
List the container images your workloads require |
export / import |
Move images as tar archives — air-gapped environments, CI caching |
cipher |
Encrypt and decrypt SOPS secrets — see Secret Management |
Target a specific environment
Section titled “Target a specific environment”Any workload command can run against a different config with --config. One repository, one
workflow, a config per environment:
# Validate the prod config's manifests offline, then deliverksail --config ksail.prod.yaml workload validateksail --config ksail.prod.yaml workload pushksail --config ksail.prod.yaml workload reconcileSee the Multi-Environment guide for the full pattern.
Related
Section titled “Related”- Local Service Intercepts — serve a selected Deployment’s live traffic from a local process
- Deliver with GitOps — the recommended
push+reconcileworkflow, end to end - GitOps Workflows — Flux and ArgoCD setup, artifacts, and reconciliation in depth
- Registry Management — where
pushartifacts and your images live - Secret Management — SOPS-encrypted secrets with
workload cipher - Companion Tools — K9s and the embedded tooling behind these commands
ksail workloadCLI reference — every subcommand and flag