my prefect server setup prefect-metrics.waow.tech
python orchestration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

switch to kubernetes work pool with from_source deployment

- worker uses prefecthq/prefect:3-python3.11-kubernetes image
- namespace-scoped RBAC matching official helm chart
- PREFECT_INTEGRATIONS_KUBERNETES_OBSERVER_NAMESPACES=prefect
- flow.from_source() pulls code from tangled repo at runtime
- work pool type changed from process to kubernetes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz 671d5e3e c39fe007

+11 -7
+7 -5
deploy/worker.yaml
··· 16 16 serviceAccountName: prefect-worker 17 17 containers: 18 18 - name: worker 19 - image: prefecthq/prefect:3-latest 19 + image: prefecthq/prefect:3-python3.11-kubernetes 20 20 command: 21 21 - prefect 22 22 - worker ··· 31 31 secretKeyRef: 32 32 name: prefect-auth 33 33 key: auth-string 34 + - name: PREFECT_INTEGRATIONS_KUBERNETES_OBSERVER_NAMESPACES 35 + value: prefect 34 36 --- 35 37 apiVersion: v1 36 38 kind: ServiceAccount ··· 44 46 name: prefect-worker 45 47 namespace: prefect 46 48 rules: 49 + - apiGroups: [""] 50 + resources: ["events", "pods", "pods/log", "pods/status"] 51 + verbs: ["get", "watch", "list"] 47 52 - apiGroups: ["batch"] 48 53 resources: ["jobs"] 49 - verbs: ["create", "get", "list", "watch", "delete"] 50 - - apiGroups: [""] 51 - resources: ["pods", "pods/log"] 52 - verbs: ["get", "list", "watch"] 54 + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] 53 55 --- 54 56 apiVersion: rbac.authorization.k8s.io/v1 55 57 kind: RoleBinding
+4 -2
flows/diagnostics.py
··· 19 19 20 20 21 21 if __name__ == "__main__": 22 - diagnostics.deploy( 22 + flow.from_source( 23 + source="https://tangled.sh/zzstoatzz.io/my-prefect-server.git", 24 + entrypoint="flows/diagnostics.py:diagnostics", 25 + ).deploy( 23 26 name="diagnostics-every-5m", 24 27 work_pool_name="kubernetes-pool", 25 - image="prefecthq/prefect:3-latest", 26 28 cron="*/5 * * * *", 27 29 )