07/04/2023, 3:16 PM
I followed the instruction to install k8s prefect-worker chart from here, Got 2 failures: 1. limit can not be None - as it is set be default for some reason (updated it by adding limit: 5 to the config section) 2. Got the API Key issue as many others got:
Copy code
Worker 'KubernetesWorker 0c71c16f-d861-467d-b6fc-761b01a5ea66' started!
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/prefect/cli/", line 41, in wrapper
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/prefect/utilities/", line 255, in coroutine_wrapper
    return call()
  File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/", line 383, in __call__
    return self.result()
  File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/", line 283, in result
    return self.future.result(timeout=timeout)
  File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/", line 169, in result
    return self.__get_result()
  File "/usr/local/lib/python3.11/concurrent/futures/", line 401, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/", line 346, in _run_async
    result = await coro
  File "/usr/local/lib/python3.11/site-packages/prefect/cli/", line 129, in start
    await worker.sync_with_backend()
  File "/usr/local/lib/python3.11/site-packages/prefect/workers/", line 690, in sync_with_backend
    await self._update_local_work_pool_info()
  File "/usr/local/lib/python3.11/site-packages/prefect/workers/", line 647, in _update_local_work_pool_info
    work_pool = await self._client.read_work_pool(
  File "/usr/local/lib/python3.11/site-packages/prefect/client/", line 2183, in read_work_pool
    response = await self._client.get(f"/work_pools/{work_pool_name}")
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1757, in get
    return await self.request(
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1530, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/usr/local/lib/python3.11/site-packages/prefect/client/", line 280, in send
  File "/usr/local/lib/python3.11/site-packages/prefect/client/", line 138, in raise_for_status
    raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '403 Forbidden' for url '<>'
Response: {'detail': 'Unauthorized'}
For more information check: <>
An exception occurred.
Checked the health of my key by this and I see
{"detail":"Not authenticated"}
Not sure where to go from here???

Christopher Boyd

07/05/2023, 2:12 PM
Hi Avi, - 403 means you have a good key, that is quite literally not permitted to that workspace
If you are already authenticated through the CLI locally, you can run
prefect profile inspect
to verify what is being used. I would double check that the API key you are using is valid for the account + workspace you are trying to use it with. An example of where this could be problematic is if you have two workspaces, and are using an api key for one workspace, that was created for another