View in #prefect-community on Slack
@Klemen_Strojan: Here is another one - we’re trying to deploy a K8s agent on AKS, K8s version 1.22.2
After running
prefect agent kubernetes install \
-k ${PREFECT_DE_PROD_API} \
--namespace prefect-latest \
--mem-request=16Gi \
--mem-limit=128Gi \
--cpu-request=4 \
--cpu-limit=32 \
--image-pull-secrets azurecr-secret \
--label k8s \
--label prod \
--label latest \
--rbac | kubectl apply --namespace=prefect-latest -f -
we get:
deployment.apps/prefect-agent created
<http://role.rbac.authorization.k8s.io/prefect-agent-rbac|role.rbac.authorization.k8s.io/prefect-agent-rbac> unchanged
error: unable to recognize "STDIN": no matches for kind "RoleBinding" in version "<http://rbac.authorization.k8s.io/v1beta1|rbac.authorization.k8s.io/v1beta1>"
We should be using
<http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
What should we do?
@Anna_Geller: @Klemen_Strojan This has been recently merged so it should be released soon.
For now, you can simply do:
prefect agent kubernetes install \
-k ${PREFECT_DE_PROD_API} \
--namespace prefect-latest \
--mem-request=16Gi \
--mem-limit=128Gi \
--cpu-request=4 \
--cpu-limit=32 \
--image-pull-secrets azurecr-secret \
--label k8s \
--label prod \
--label latest \
--rbac >> prefect_agent.yaml
Then manually change the v1beta1 to v1 and apply:
kubectl apply -f prefect_agent.yaml --namespace=prefect-latest
@Klemen_Strojan: This worked! Thank you for your help today @Anna_Geller, much appreciated!