Jey Farmer
06/20/2023, 3:06 PMapiUrl: <http://127.0.0.1:4200/api>
- this is default in the helm chart and docs don’t mention changing this
Error I receive when looking at the logs of the worker
Worker 'KubernetesWorker 3f629027-a4e8-4b08-b856-2e5c62e38933' started!
15:01:39.075 | DEBUG | prefect.worker.kubernetes.kubernetesworker 3f629027-a4e8-4b08-b856-2e5c62e38933 - Exiting worker context...
15:01:39.075 | DEBUG | prefect.worker.kubernetes.kubernetesworker 3f629027-a4e8-4b08-b856-2e5c62e38933 - Tearing down worker...
15:01:39.076 | DEBUG | MainThread | prefect._internal.concurrency - <AsyncCancelScope, name='start' COMPLETED, runtime=2.02> exited
15:01:39.076 | DEBUG | MainThread | prefect._internal.concurrency - Encountered exception in async call start(worker_name=None, work_pool_name='jey-test-custom-k8s-work-pool', work_queues=[], worker_type='kuber...)
Traceback (most recent call last):
..... shortened logs.....
prefect.exceptions.PrefectHTTPStatusError: Client error '403 Forbidden' for url '<https://api.prefect.cloud/api/accounts/><REMOVED_ACCOUNT_ID>/workspaces/<REMOVED_WORKSPACE_ID>/work_pools/jey-test-custom-k8s-work-pool'
Response: {'detail': 'Unauthorized'}
For more information check: <https://httpstatuses.com/403>
Christopher Boyd
06/20/2023, 6:43 PMJey Farmer
06/20/2023, 6:46 PMapiKeySecret:
# -- prefect API secret name
name: prefect-api-key
# -- prefect API secret key
key: key
referencing a key I’ve created manually within the prefect namespace
k get secret -n prefect
NAME TYPE DATA AGE
prefect-api-key Opaque 1 3d21h
Christopher Boyd
06/20/2023, 6:50 PMk create secret generic prefect-api-key --from-literal 'key=<actual_key>
Christopher Boyd
06/20/2023, 6:50 PMhelm install --dru-run --debug -f <override.yaml>
to ensure the values are being rendered correctly, namely the url and keyJey Farmer
06/20/2023, 6:54 PMChristopher Boyd
06/20/2023, 7:02 PMJey Farmer
06/20/2023, 7:21 PMprefect cloud login
command and I’m able to login 🤔 I am on the free plan for the POC does that matter?Christopher Boyd
06/20/2023, 7:22 PMChristopher Boyd
06/20/2023, 7:22 PMJey Farmer
06/20/2023, 7:24 PMJey Farmer
06/20/2023, 7:26 PMprefect profile inspect
Are there somehow 2 account Ids or did I pull it from the wrong place?Christopher Boyd
06/20/2023, 7:27 PMprefect cloud login -k <key>
then selected a workspace, that should be what prefect profile inspect logged you into with that key (and by extension where that key was generated).
If you’re in the UI with a different account, you should be able to just generate a new api key and use thatChristopher Boyd
06/20/2023, 7:27 PMChristopher Boyd
06/20/2023, 7:28 PMChristopher Boyd
06/20/2023, 7:28 PMChristopher Boyd
06/20/2023, 7:28 PMJey Farmer
06/20/2023, 7:29 PMJey Farmer
06/20/2023, 7:31 PMAvi
07/04/2023, 2:35 PMJey Farmer
07/04/2023, 2:42 PMAvi
07/06/2023, 7:55 AMJey Farmer
07/10/2023, 5:59 PM