Hi all! At my company, we are using the Prefect pl...
# ask-community
e
Hi all! At my company, we are using the Prefect platform integrated with Google Cloud Kubernetes and now we are testing the Prefect Cloud using Kubernetes as agents/workers. Is there any doc/tutorial to do that? I found this article and they talk about a
runner token
that I couldn't be able to find in the Cloud UI. Thanks in advance.
a
You’re right, the tokens have been deprecated and replaced with much simpler api keys. The right command to start a Kubernetes agent would be:
Copy code
prefect agent kubernetes install --rbac -k YOUR_API_KEY | kubectl apply --namespace=my-namespace -f -
This documentation page explains it in far more detail. What you can also do is to first generate the YAML file for your agent and apply it only after you manually cross-checked everything in the YAML looks good.
Copy code
prefect agent kubernetes install --rbac -k YOUR_API_KEY >> agent.yaml
Then you can adjust everything in the agent.yaml e.g. add your agent label (for instance “production” or “staging”), add env variables and then apply:
Copy code
kubectl apply -f agent.yaml
e
Thanks @Anna Geller , I'll give a try to these docs!