CLI Reference
Yoke
yoke
What is it?
yoke is a helm inspired infrastructure-as-code (IaC) package deployer.
What does it do?
Deploys "yoke flights" to a kubernetes cluster.
Available commands:
takeoff (aliases: up, apply)
descent (aliases: down, restore)
mayday (aliases: delete)
blackbox (aliases: inspect)
turbulence (aliases: drift)
version
Global Flags
-kubeconfig string
path to kube config
-verbose
verbose output mode
Takeoff
This command applies creates releases or new revisions of releases to your cluster. Release resources can be created from wasm executables or passed directly to takeoff via stdin.
yoke takeoff
Usage:
yoke takeoff [flags] <release-name> <flight-path>
Aliases:
apply, up
Examples:
# deploy a local flight
yoke takeoff my-release ./main.wasm
# gzipped wasm files are supported
yoke takeoff my-release ./main.wasm.gz
# deploy a remote flight
yoke takeoff my-release https://github.com/my_org/infra/releases/v1.2.3-release.wasm
# deploy passing arguments to the flight
yoke takeoff my-release ./main.wasm -- -env prod
# deploy passing data over stdin to the flight
yoke takeoff my-release ./main.wasm < input.file
# omit the wasm asset and stdin is interpreted as the desired output of your flight
yoke takeoff my-release < resources.json
# deploy resources from a unix pipe
generate-resources.sh | yoke takeoff my-releae
# view the diff between would be applied release resources and the current state of the release.
yoke takeoff -diff-only my-release main.wasm
Flags:
-force-conflicts
force apply changes on field manager conflicts
-kubeconfig string
path to kube config
-namespace string
preferred namespace for resources if they do not define one (default "default")
-out string
if present outputs flight resources to directory specified, if out is - outputs to standard out
-skip-dry-run
disables running dry run to resources before applying them
-test-run
test-run executes the underlying wasm and outputs it to stdout but does not apply any resources to the cluster
-verbose
verbose output mode
Descent
This command allows you to restore previous revision states. Yoke keeps track of each release's revision history and allows you to rollback to previous versions. This command will cleanup resources from a previous state just as takeoff does when creating new releases.
yoke descent
Usage:
yoke decent [flags] <release-name> <revision-id>
Aliases:
down, restore
Examples:
# restore state to revision history 42
yoke descent my-release 42
Flags:
-kubeconfig string
path to kube config
-verbose
verbose output mode
Mayday
This command removes a release entirely. It will cleanup all resources in the releases and remove the release. You will not be able to use descent/rollback afterwards. This command is equivalent to a hard delete.
yoke mayday
Usage:
yoke mayday [flags] <release>
Aliases:
delete
Examples:
# delete a release and all its revision history
yoke mayday foo
Flags:
-kubeconfig string
path to kube config
-verbose
verbose output mode
Blackbox
This command allows you to inspect your various releases, their revision history, and their diffs. It also allows you to view the release to resource mapping throughout your cluster.
yoke blackbox
Usage:
yoke blackbox [flags] [release] [revision-id] [revision-id-to-compare]
Aliases:
inspect
Examples:
# get an overview of all releases and their current revision id
yoke blackbox
# get an overview of all revisions for a given release
yoke blackbox release
# render the resources for specific revision
yoke blackbox release 42
# show list of resources by release
yoke blackbox --mapping
Flags:
-context int
number of lines of context in diff (ignored if not comparing revisions) (default 4)
-kubeconfig string
path to kube config
-mapping
print release to resource mappings. If present ignores all other args
-verbose
verbose output mode
Turbulence
This command is used to view any drift between your desired release state and the state of the cluster. This drift often happens when developers run experiments on state in the cluster via manual edits and forget to clean them up. It works by looking for conflicts between desired and actual state. This limitation means that added state is not removed when turbulence is fixed.
An option to do a hard replace will be provided in a future release.
yoke turbulence
Usage:
yoke turbulence [flags] <release-name>
Aliases:
drift
Examples:
# get the diff between desired state of release foo and the state of the cluster
yoke turbulence foo
# see all diff including state not specified by the release such as defaults, managedFields, resource id annotations
yoke turbulence -conflict-only=false foo
# fix the turbulence and apply desired release state over any drift.
yoke turbulence -fix foo
Flags:
-color
outputs diff with color (default true)
-conflict-only
only show turbulence for declared state.
If false, will show diff against state that was not declared;
such as server generated annotations, status, defaults and more (default true)
-context int
number of lines of context in diff (default 4)
-fix
fix the drift. If present conflict-only will be true.
-kubeconfig string
path to kube config (default "/Users/davidmdm/.kube/config")
-verbose
verbose output mode