GraphQL is difficult because you would need to be already authenticated to create an API key - itâs easiest to just log into the UI and create the key from there.
Not sure I understand the question. What do you try to accomplish? Are you getting started with Prefect right now? if so, did you already 100% decide that you want to self-host or is Prefect Cloud an option?
You could sign up for Prefect Cloud for free and then you can use your Kubernetes cluster as your execution layer for your flows. To do that, you spin up a Kubernetes agent.
We have decided to self-host Prefect on our Kubernetes cluster (EKS).
Your suggestion is to âSign up Prefect Cloud for free and then you can use your Kubernetes clusterâ.
We went through the helm chart - and created the Prefect cluster on EKS in different namespace. No issues. We are able to kubectl around the namespace. All the pods are up and running (towel,hasura,apollo, etc âŚ) for the last 8 days!
Now we would like to use the Prefect cluster. And for that we need the API Key to get started.
what do you mean by a Prefect cluster - do you mean the Kubernetes agent? we donât host any infrastructure other than the orchestration layer backend
Here is the prefect command and exception stack trace. The trace is less than before âŚ
(env) ********:~/prefect-installation-yaml-eks-notes/getting-started/examples/eksconfig $ prefect agent kubernetes start --namespace prefect-server --service-account-name default
[2022-04-25 16:43:52-0400] WARNING - prefect.kubernetes | Service host/port is not set. Using out of cluster configuration option.
[2022-04-25 16:43:54-0400] WARNING - prefect.kubernetes | Service host/port is not set. Using out of cluster configuration option.
[2022-04-25 20:43:55,640] ERROR - agent | Failed to verify authentication.
Traceback (most recent call last):
File "/home/*******/prefect-installation-yaml-eks-notes/getting-started/env/lib/python3.6/site-packages/prefect/agent/agent.py", line 901, in _setup_api_connection
self._verify_token(self.client.get_auth_token())
File "/home/*******/prefect-installation-yaml-eks-notes/getting-started/env/lib/python3.6/site-packages/prefect/agent/agent.py", line 831, in _verify_token
raise AuthorizationError("No agent API token provided.")
prefect.exceptions.AuthorizationError: No agent API token provided.
The above exception was the direct cause of the following exception:
...
...
...
RuntimeError: Error while contacting API at https://api.prefect.io
Can you explain why? Did the agent deployed as part of the Helm chart stop working? You only need one agent - the actual execution takes place in separate processes. Check this discourse topic for more info about that: