hello, I am following the instruction to set up se...
# prefect-getting-started
m
hello, I am following the instruction to set up self hosted
prefect server
and
prefect worker
on my company’s kubernetes using the official helm charts but having some problems. can someone help me to resolve the issues? chart: https://github.com/PrefectHQ/prefect-helm/tree/main
Copy code
prefect-server 	prefect    1    2024-01-22 20:40:27.215408 -0800 PST   	deployed	prefect-server-2024.1.19  	2.14.16
prefect-worker 	prefect    1    2024-01-22 20:58:28.255938 -0800 PST   	deployed	prefect-worker-2024.1.19  	2.14.16
server chart installed fine but I tried to install the worker with this values file
Copy code
worker:
  apiConfig: selfHosted
  selfHostedApiConfig:
    apiUrl: "<https://prefect.company.com/api>"
    uiUrl: "<https://prefect.company.com/>"
I’m getting this error.
Copy code
helm upgrade --install -f k8s/prefect-worker/values.yaml -f k8s/prefect-worker/values.dev.yaml --wait --namespace prefect our-prefect-worker prefect/prefect-worker
Release "our-prefect-worker" does not exist. Installing it now.
Error: execution error at (prefect-worker/templates/_helpers.tpl:74:94): A Prefect Cloud Account ID is required (worker.selfHostedApiConfig.accountId)
afaik, the self hosted server doesn’t provide account id, so I’m not sure where I can get the account id. this document leads me to think that accounts and workspaces are
cloud
only feature: https://docs.prefect.io/latest/guides/host/#differences-between-a-self-hosted-prefect-server-and-prefect-cloud
I tried to use my account id and workspace id from my prefect cloud account in the values file like this.
Copy code
worker:
  apiConfig: selfHosted
  selfHostedApiConfig:
    apiUrl: "<https://prefect.company.com/api>"
    uiUrl: "<https://prefect.company.com/>"
    accountId: xxxxxxx-xxxx-xxxx-xxxx-xxxxxx
    workspaceId: xxxxxxx-xxxx-xxxx-xxxx-xxxxxx
then the chart gets installed
Copy code
+ helm upgrade --install -f k8s/prefect-worker/values.yaml -f k8s/prefect-worker/values.dev.yaml --wait --namespace prefect our-prefect-worker prefect/prefect-worker
Release "our-prefect-worker" does not exist. Installing it now.
NAME: our-prefect-worker
LAST DEPLOYED: Mon Jan 22 21:41:55 2024
NAMESPACE: prefect
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Check Prefect worker connections in the prefect UI at "<https://prefect.company.com//account/xxxxxxx-xxxx-xxxx-xxxx-xxxxxx/workspace/xxxxxxx-xxxx-xxxx-xxxx-xxxxxx>"
but the pods are going through CrashLoopBackOff with this error:
Copy code
prefect.exceptions.PrefectHTTPStatusError: Client error '403 Forbidden' for url '<https://prefect.company.com/api/accounts/xxxxxxx-xxxx-xxxx-xxxx-xxxxxx/workspaces/xxxxxxx-xxxx-xxxx-xxxx-xxxxxx/work_pools/onec-k8s-work-pool>'
so it looks like the helm chart for the self hosted path may not be tested or I might be missing something.
please advise. thanks for the help
j
Hi @Michael Kang - you should be using the configuration for the prefect server config under the worker values, not the self hosted. The self hosted configuration is for a packaged on prem installation of Prefect Cloud where as Prefect Server is the open source engine. I realize this is confusing and will update the docs to make this more clear!
m
thanks, i’ll use the
server
configs