https://prefect.io logo
Title
j

John Lewis

01/16/2023, 10:17 PM
I am attempting the procedure for running a flow in k8s here: https://medium.com/the-prefect-blog/how-to-use-kubernetes-with-prefect-part-3-e2223ce34ba7 However, I am using Orion that is in the k8s deployment instead of Prefect Cloud. I am seeing this message when running the check flow. I am not sure what is trying to read the namespaces: Submission failed. kubernetes.client.exceptions.ApiException: (403) Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': '8258377d-af37-40ee-86d2-434dfa1810da', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '16307fe8-67b1-4be7-91c1-216303a29223', 'X-Kubernetes-Pf-Prioritylevel-Uid': '5e8ed7d2-abb4-4683-b564-c99242ffdaf7', 'Date': 'Mon, 16 Jan 2023 22🔟20 GMT', 'Content-Length': '341'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces \"kube-system\" is forbidden: User \"system😒erviceaccount:prefect2:default\" cannot get resource \"namespaces\" in API group \"\" in the namespace \"kube-system\"","reason":"Forbidden","details":{"name":"kube-system","kind":"namespaces"},"code":403}
1
I ended up with better results by deploying with this process: https://github.com/PrefectHQ/prefect-helm
j

Jeff Hale

01/18/2023, 1:17 AM
Glad that worked! That's a potential future post. Lots of ways to use k8s and Prefect.
j

John Lewis

01/18/2023, 2:12 AM
@Jeff Hale, your 3 posts on k8s and Prefect were very helpful.
:thank-you: 1
j

Jeff Hale

01/18/2023, 2:15 AM
Good to hear!