Skip to main content

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

SubcommandAliasesDescription
register filesfileRegister local or remote serialized protobuf files
register examplesexample, flytesnack, flytesnacksRegister 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:
FlagDescription
--versionVersion string to assign to registered entities (default: v1)
--archiveTreat input as a .tgz or .tar archive
--continueOnErrorContinue registering remaining files on error
--assumableIamRoleIAM role ARN for launch plans
--k8sServiceAccountKubernetes service account for launch plans
--outputLocationPrefixOutput location prefix for offloaded types
--destinationDirectorySource code location in container
--enableScheduleActivate schedules on registered launch plans
--forceForce overwrite of existing entity versions
--dryRunPrint 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

1

Package your workflows with pyflyte

pyflyte package --image my-image:latest -o _pb_output/
2

Create the target project (if it does not exist)

flytectl create project \
  --id my-project \
  --name "My Project" \
  --description "My Flyte project"
3

Register the serialized files

flytectl register files _pb_output/* \
  -p my-project \
  -d development \
  --version v1
4

Verify the workflows are registered

flytectl get workflow -p my-project -d development
5

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

Build docs developers (and LLMs) love