Dimosthenis Schizas
12/22/2021, 3:31 PMPREFECT__CLOUD__AGENT__AUTH_TOKEN
which is deprecated if I understand correctly. Is it correct to assume that I can remove that arg and keep only the PREFECT__CLOUD__API_KEY
Anna Geller
Anna Geller
Dimosthenis Schizas
12/22/2021, 3:44 PMDimosthenis Schizas
12/22/2021, 3:45 PMAnna Geller
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:
kubectl apply -f agent.yaml
Dimosthenis Schizas
12/22/2021, 3:49 PMAnna Geller
Dimosthenis Schizas
12/22/2021, 3:50 PMAnna Geller
- name: PREFECT__CLOUD__AGENT__LABELS
value: '["prod-kubernetes"]'
and then on your flow:
with Flow(
FLOW_NAME, storage=STORAGE, run_config=KubernetesRun(labels=["prod-kubernetes"],),
) as flow:
Dimosthenis Schizas
12/22/2021, 4:00 PMprefect agent kubernetes install --rbac -k YOUR_API_KEY >> agent.yaml
and then applied it using
kubectl apply -f agent.yaml
The pod errors and after 3 restarts it backs off. Trying to figure out why. Have you encountered something like that before?Dimosthenis Schizas
12/22/2021, 4:01 PMprefecthq/prefect:0.15.10-python3.6
Anna Geller
apiVersion: <http://rbac.authorization.k8s.io/v1beta1|rbac.authorization.k8s.io/v1beta1>
replace it with:
apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
Anna Geller