Caelan
10/15/2024, 1:07 PMMarvin
10/15/2024, 1:07 PMPREFECT_KUBERNETES_CLUSTER_UID
and PREFECT_API_KEY
depends on your specific deployment setup and the Prefect version you are using.
### `PREFECT_API_KEY`:
- Prefect 2.x: You need to create an API key and store it safely, ideally using a password manager. This API key is generally required for workers deployed with Prefect Cloud to authenticate and register tasks or flows.
- Prefect 3.x: Similar requirements exist, and it is often set up as a Kubernetes secret which your deployment reads to authenticate with Prefect Cloud.
Sources:
- Prefect 2.x: Prefect Kubernetes Worker Guide
- Prefect 3.x: Kubernetes Deployment Guide
### `PREFECT_KUBERNETES_CLUSTER_UID`:
This environment variable isn't mentioned directly in the documentation for either version, and is typically not required unless you have a specific setup that needs it. Normally, the Kubernetes cluster configuration is handled through different settings where necessary permissions are set up, particularly if your worker's cluster differs from the one executing the flow runs.
Sources:
- General Kubernetes Setup information for both Prefect 2.x and 3.x: See the same links above for more detailed deployment instructions and environment variable utilisation.
Both of these variables often depend on the specific infrastructure and authentication setup of your cloud provider and Kubernetes cluster, so it's essential to align these configurations with your specific requirements and infrastructure.