Skip to content

Install

Each GitHub release has two manifests:

FileContents
prefect-operator.yamlThe CRDs, and the operator’s ServiceAccount, RBAC, and Deployment. v1.0 and later also include the admission policies.
prefect-crds.yamlThe CRDs only.

With kubectl

VERSION=v1.0.0
kubectl apply --server-side \
  -f https://github.com/PrefectHQ/prefect-operator/releases/download/$VERSION/prefect-operator.yaml

The CRDs are large, so apply with --server-side. A client-side apply stores the whole object in the kubectl.kubernetes.io/last-applied-configuration annotation, which can exceed the 256 KiB annotation limit.

The manifest installs the operator into the default namespace. To read it before applying it:

curl -sL https://github.com/PrefectHQ/prefect-operator/releases/download/$VERSION/prefect-operator.yaml \
  | grep -E '^kind:' | sort | uniq -c

With Helm

helm repo add prefect-operator https://prefecthq.github.io/prefect-operator
helm repo update
helm install prefect-operator prefect-operator/prefect-operator \
  --namespace prefect-system --create-namespace

The chart’s values are listed in the chart README, which also covers verifying the chart’s signature.

Check that it’s running

kubectl get deployment prefect-operator
kubectl get crds | grep prefect.io

The second command lists five CRDs: prefectautomations, prefectdeployments, prefectservers, prefectworkpools, and prefectworkqueues.

Requirements

  • Kubernetes 1.30 or later for the admission policies. CI tests the chart on the versions listed in operator-lint-and-test.yaml.
  • Without the admission policies, see Permissions for what anyone who can write the custom resources can do.

Upgrade and downgrade

See Upgrade for what changes in each release, and what to do before you upgrade or after you downgrade.

Uninstall

Delete the custom resources first, so the operator can delete the objects it created in Prefect. Then delete the operator:

kubectl delete prefectautomations,prefectdeployments,prefectworkqueues,prefectworkpools,prefectservers --all -A
kubectl delete -f https://github.com/PrefectHQ/prefect-operator/releases/download/$VERSION/prefect-operator.yaml

Each PrefectServer stays up until the resources that use it are gone, so they can delete their objects from it.

If you delete the operator first, the resources keep their finalizers and stay in Terminating. See Deletion.