Prefect 2.08b kubernetes install in a different namespace. RBAC issues

Hi,

Trying to install Prefect 2.08b on Kubernetes (EKS) using a different namespace - other than ‘default’.
Looks like the deployment was installed but did not configure the

prefect kubernetes manifest orion | kubectl apply -f - --namespace=prefect-server-2-0b
deployment.apps/orion created
service/orion created
the namespace from the provided object “default” does not match the namespace “prefect-server-2-0b”. You must pass ‘–namespace=default’ to perform this operation.
the namespace from the provided object “default” does not match the namespace “prefect-server-2-0b”. You must pass ‘–namespace=default’ to perform this operation.

Expected output from the docs - https://orion-docs.prefect.io/tutorials/kubernetes-flow-runner/

$ prefect kubernetes manifest orion | kubectl apply -f -
deployment.apps/orion created
service/orion created
role.rbac.authorization.k8s.io/flow-runner created
rolebinding.rbac.authorization.k8s.io/flow-runner-role-binding created

1 Like

Ravi, I won’t be able to test this out this month, but I plan to build more recipes for various deployment options as shown here:

For now, I recommend starting with Cloud 2.0 with recipes shown here

Hey, Ravi! The prefect kubernetes manifest orion command produces a manifest that uses the “default” namespace. There isn’t currently a way to pass in a namespace to when generating the manifest.

One thing you could do is pipe the output to sed and do a string substitution. Something like this:

prefect kubernetes manifest orion | sed 's/default/my-namespace/g' | kubectl apply -f - --namespace=my-namespace

Or, you could output the file to disk first with prefect kubernetes manifest orion > manifest.yaml, change the usages of “default” to the namespace you want in that file, and then apply the file directly with e.g. kubectl apply -f orion-manifest.yaml.

1 Like