Im running a kubernetes agent on GKE and trying to...
# prefect-server
d
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
Hey @Daniel Davee, it should be something like
http://<your_ip>:4200/graphql
. Was that what you were using?
d
And PREFECT__CLOUD__AGENT__AGENT_ADDRESS is GKE address?
k
http://:8080
Actually let me check on that, one sec. I asked a team member and I’ll get back to you
d
It worked
k
Oh ok. Are you good now?
d
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 222953 GMT', 'Content-Length': '311'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"jobs.batch is forbidden: User \"systemserviceaccountdefault: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
Are you using a custom job template?
d
No, I am use a Docker storage
k
How did you spin up the agent?
Have you seen the RBAC permissions needed?
d
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
Hi @Daniel Davee - where is the UI giving you that error? Is that a log on the flow run?
d
It was the log output. I actually haven't figured out how to get anymore infomation out of it yet
n
Gotcha - did you take a look at the link @Kevin Kho sent? Your agent will need batch jobs permissions to work properly
t
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