Mark Reyes
09/23/2024, 7:50 PMMarvin
09/23/2024, 7:51 PMsh
helm repo add prefect <https://prefecthq.github.io/prefect-helm>
helm repo update
2. Create a namespace in your Kubernetes cluster:
sh
kubectl create namespace prefect
3. Create a Kubernetes secret for the Prefect API key:
sh
kubectl create secret generic prefect-api-key \
--namespace=prefect --from-literal=key=your-prefect-cloud-api-key
4. Create a values.yaml
file to customize the Prefect worker and server configuration:
The contents of the file might look something like this:
yaml
worker:
cloudApi:
apiKeySecret: prefect-api-key
workQueueName: your-work-queue-name
server:
enabled: true
5. Install the Prefect worker using the Helm chart:
sh
helm install prefect-worker prefect/prefect-worker \
--namespace=prefect \
-f values.yaml
6. Verify the deployment:
sh
kubectl get pods -n prefect
You can find more detailed information and customization options in the Prefect documentation.Mark Reyes
09/23/2024, 7:51 PMMarvin
09/23/2024, 7:52 PMsh
helm repo add prefect <https://prefecthq.github.io/prefect-helm>
helm repo update
3. Namespace: Create a namespace in your Kubernetes cluster to deploy the Prefect worker.
sh
kubectl create namespace prefect
4. Kubernetes Secret: Create a Kubernetes secret for the Prefect API key.
sh
kubectl create secret generic prefect-api-key \
--namespace=prefect --from-literal=key=your-prefect-cloud-api-key
5. Helm Chart Configuration: Configure the Helm chart values in a values.yaml
file to customize the Prefect worker configuration.
yaml
worker:
cloudApiConfig:
accountId: <target account ID>
workspaceId: <target workspace ID>
config:
workPool: <target work pool name>
### Dependencies for Prefect Server:
1. Kubernetes Cluster: Ensure you have a Kubernetes cluster up and running.
2. Helm: Add the Prefect Helm repository to your Helm client as mentioned above.
3. Namespace: Create a namespace in your Kubernetes cluster to deploy the Prefect server.
sh
kubectl create namespace prefect
4. Helm Chart Configuration: Configure the Helm chart values in a values.yaml
file to customize the Prefect server configuration.
yaml
server:
enabled: true
### Installing the Helm Chart:
1. Worker Installation: Install the Prefect worker using the Helm chart with your custom values.yaml
file.
sh
helm install prefect-worker prefect/prefect-worker \
--namespace=prefect \
-f values.yaml
2. Server Installation: Install the Prefect server using the same method as you did for the worker, ensuring the server
section in the values.yaml
file is appropriately configured.
### Verify Deployment:
1. Check the status of your Pods:
sh
kubectl get pods -n prefect
More detailed information can be found in the Prefect Kubernetes Deployment Guide. If you need additional customization or run into issues, the Prefect documentation and community forums are great places to search for solutions.