https://prefect.io logo
Title
d

Daniel Davee

06/07/2021, 7:41 PM
Im running a kubernetes agent on GKE and trying to connect to a VM in GCP and I am getting this error 405 Client Error: Not Allowed for url: what should be the default value for PREFECT__CLOUD__API
k

Kevin Kho

06/07/2021, 7:45 PM
Hey @Daniel Davee, it should be something like
http://<your_ip>:4200/graphql
. Was that what you were using?
d

Daniel Davee

06/07/2021, 7:46 PM
And PREFECT__CLOUD__AGENT__AGENT_ADDRESS is GKE address?
k

Kevin Kho

06/07/2021, 7:50 PM
http://:8080
Actually let me check on that, one sec. I asked a team member and I’ll get back to you
d

Daniel Davee

06/07/2021, 7:57 PM
It worked
k

Kevin Kho

06/07/2021, 7:58 PM
Oh ok. Are you good now?
d

Daniel Davee

06/07/2021, 7:59 PM
Yes thank you so much
So when I try to run the job from the UI I get this in log (403) Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': '15aa7cc0-c04b-4a5d-a775-3afa74b71c72', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'Date': 'Mon, 07 Jun 2021 22:29:53 GMT', 'Content-Length': '311'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"jobs.batch is forbidden: User \"system😒erviceaccount:default:default\" cannot create resource \"jobs\" in API group \"batch\" in the namespace \"default\"","reason":"Forbidden","details":{"group":"batch","kind":"jobs"},"code":403}
my kube agent is running on GKE and the server is on GCP.
k

Kevin Kho

06/07/2021, 10:35 PM
Are you using a custom job template?
d

Daniel Davee

06/07/2021, 10:36 PM
No, I am use a Docker storage
k

Kevin Kho

06/07/2021, 10:37 PM
How did you spin up the agent?
Have you seen the RBAC permissions needed?
d

Daniel Davee

06/07/2021, 10:42 PM
I spun up the agent using prefect agent kubernetest install, edited the output to point to the server. I can run flows from the cmd line no problem, but the UI gives me this error
n

nicholas

06/07/2021, 10:47 PM
Hi @Daniel Davee - where is the UI giving you that error? Is that a log on the flow run?
d

Daniel Davee

06/07/2021, 10:48 PM
It was the log output. I actually haven't figured out how to get anymore infomation out of it yet
n

nicholas

06/07/2021, 10:51 PM
Gotcha - did you take a look at the link @Kevin Kho sent? Your agent will need batch jobs permissions to work properly
t

Tyler Wanner

06/09/2021, 3:17 PM
Hi Daniel, looks like you may have missed the
--rbac
flag when you ran the agent install command. Try running the install again when you can. When you say "run flows from the cmd line," do you mean local flows? If you could provide the install command and the command you're using to "run flows from the cmd line" that would be helpful
:upvote: 1