Overview
flytectl register takes serialized protobuf files produced by pyflyte package and registers them with FlyteAdmin. Project and domain are required. Version defaults to v1 if not specified.
flytectl register <subcommand> [files ...] -p <project> -d <domain> [flags]
If entities with the same version already exist in FlyteAdmin, registration fails unless --continueOnError is set.
Subcommands
| Subcommand | Aliases | Description |
|---|
register files | file | Register local or remote serialized protobuf files |
register examples | example, flytesnack, flytesnacks | Register the latest (or a pinned) Flytesnacks release |
register files
Register all serialized task, workflow, and launch plan protobuf files.
Basic registration
# Register all protos from a directory
flytectl register files _pb_output/* -d development -p flytesnacks
# Register with a custom version
flytectl register files _pb_output/* -d development -p flytesnacks --version v2
# Continue past version conflicts and other errors
flytectl register files _pb_output/* -d development -p flytesnacks --continueOnError
Archive (tgz / tar) files
Pass a local or remote archive with --archive:
# Remote archive over HTTP
flytectl register files http://localhost:8080/_pb_output.tar \
-d development -p flytesnacks --archive
# Local tgz archive
flytectl register files _pb_output.tgz -d development -p flytesnacks --archive
Fast registration
When pyflyte package --fast is used, the output directory contains both serialized protos and a source code archive (a .tar.gz file starting with fast). flytectl detects the archive automatically and uploads it before registering.
# Fast registration — flytectl finds and uploads the source archive automatically
flytectl register files _pb_output/* -d development -p flytesnacks --version v2
To override the destination bucket for the source code upload:
flytectl register files _pb_output/* -d development -p flytesnacks \
--version v2 --sourceUploadPath "s3://my-bucket/fast"
IAM and service account overrides
# Override IAM role
flytectl register files _pb_output/* -d development -p flytesnacks \
--version v2 --assumableIamRole "arn:aws:iam::123456789:role/my-role"
# Override Kubernetes service account
flytectl register files _pb_output/* -d development -p flytesnacks \
--version v2 --k8sServiceAccount my-k8s-service-account
Other options
# Override output location prefix for offloaded types
flytectl register files _pb_output/* -d development -p flytesnacks \
--version v2 --outputLocationPrefix "s3://my-bucket/prefix"
# Override the source code destination directory in the container
flytectl register files _pb_output/* -d development -p flytesnacks \
--version v2 --destinationDirectory "/root"
# Enable schedules defined in launch plans
flytectl register files _pb_output/* -d development -p flytesnacks \
--version v2 --enableSchedule
# Dry run — show what would be registered
flytectl register files _pb_output/* -d development -p flytesnacks --dryRun
Flags:
| Flag | Description |
|---|
--version | Version string to assign to registered entities (default: v1) |
--archive | Treat input as a .tgz or .tar archive |
--continueOnError | Continue registering remaining files on error |
--assumableIamRole | IAM role ARN for launch plans |
--k8sServiceAccount | Kubernetes service account for launch plans |
--outputLocationPrefix | Output location prefix for offloaded types |
--destinationDirectory | Source code location in container |
--enableSchedule | Activate schedules on registered launch plans |
--force | Force overwrite of existing entity versions |
--dryRun | Print the registration requests without executing them |
register examples
Register Flytesnacks example workflows. This command downloads the release assets from GitHub and registers them.
# Register the latest Flytesnacks examples
flytectl register examples -d development -p flytesnacks
# Register a specific Flytesnacks release
flytectl register examples -d development -p flytesnacks --version v0.2.176
The register examples command automatically overrides the version with the release tag from GitHub.
Full workflow example
Package your workflows with pyflyte
pyflyte package --image my-image:latest -o _pb_output/
Create the target project (if it does not exist)
flytectl create project \
--id my-project \
--name "My Project" \
--description "My Flyte project"
Register the serialized files
flytectl register files _pb_output/* \
-p my-project \
-d development \
--version v1
Verify the workflows are registered
flytectl get workflow -p my-project -d development
Launch an execution
flytectl get launchplan -p my-project -d development \
my_module.my_workflow --execFile exec.yaml
flytectl create execution --execFile exec.yaml \
-p my-project -d development