Hi community, i am trying to deploy prefect on goo...
# ask-community
a
Hi community, i am trying to deploy prefect on google kubernetes and i am unable to do it. i am using the command mentioned in documents prefect agent kubernetes install -k API_KEY | kubectl apply --namespace=default -f - and when i see the pods using kubectl get pods there in status of prefect agent it says CrashLoopBackOff. When i log the pod i see the following error prefect.exceptions.AuthorizationError: [{'path': ['auth_info'], 'message': 'AuthenticationError: Forbidden', 'extensions': {'code': 'UNAUTHENTICATED'}}]
k
Hey @Aqib Fayyaz, what Prefect version are you on?
a
0.15.6
k
What happens when you just do
prefect local agent start -k API_KEY
?
a
No such command 'local'.
k
Oh sorry
prefect agent local start -k API_KEY
a
same error
k
Gotcha it seems something is wrong with the API_KEY then. How did you go about creating it? Just making sure you are using the key value and not the name of the key (have seen some people use the key in the past)
a
i think i have not created the api key
what it is for?
k
To authenticate with Prefect Cloud
Just making sure, are you using Prefect Cloud or Server?
This will help you generate a key
a
so i got the api key and then deployed and it started working now the pod is running
k
Nice!
a
so now my question is how can i interact with prefect on kubernetes?
k
Your agent will poll for flows to run on Prefect Cloud and if it sees that there is a Flow to run, it will spin up a new job to run that Flow
Maybe this will help
1
a
Thank you so much for all the help
👍 1
k
Of course!