Here is another one - we’re trying to deploy a K8s...
# ask-community
k
Here is another one - we’re trying to deploy a K8s agent on AKS, K8s version
1.22.2
After running
Copy code
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:
Copy code
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
Copy code
<http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
What should we do?
a
@Klemen Strojan This has been recently merged so it should be released soon. For now, you can simply do:
Copy code
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:
Copy code
kubectl apply -f prefect_agent.yaml --namespace=prefect-latest
upvote 1
k
This worked! Thank you for your help today @Anna Geller, much appreciated! 🙏🙌
🙌 1