Hi all, the Prefect 2.0 Kubernetes agent auto-gene...
# ask-community
m
Hi all, the Prefect 2.0 Kubernetes agent auto-generated manifest appears to be a lot smaller than the 1.0 manifest. There are far fewer command-line switches and envvar options (just
PREFECT_API_URL
?) Are there additional agent settings in 2.0 I should be aware of for running a production k8s deployment, like the work queue name? If so, do they have envvars, and where in the docs can I read about them?
a
this is deliberately simplified, but great observation to add env vars, you can do it the same way as in any Kubernetes deployment:
Copy code
apiVersion: apps/v1
kind: Deployment
metadata:
  name: agent
  namespace: dev
spec:
  selector:
    matchLabels:
      app: agent
  replicas: 1
  template:
    metadata:
      labels:
        app: agent
    spec:
      containers:
        - name: agent
          image: prefecthq/prefect:2-python3.9
          command: ["prefect", "agent", "start", "--tag", "k8s"]
          imagePullPolicy: "IfNotPresent"
          env:
            - name: PREFECT_API_URL # other env var works the same way
              value: xxx
m
I assume this is the list of valid settings? I didn’t see a link from the k8s agent page to the settings page: https://docs.prefect.io/concepts/settings/#commonly-configured-settings
The docs say the settings are well-documented in the API docs page, but I don’t see a straight-forward list of valid settings there either. The Settings Concept docs appear to be targeted at CLI users. The API docs are targeted at core developers. I’m looking for something for devops, who has to package, deploy, debug and run the agent and the pipelines (and everything they integrate with).
a
what problem are you trying to solve?
Are there additional agent settings in 2.0 I should be aware of for running a production k8s deployment
the answer to this question is no 🙂 you need only PREFECT_API_KEY and PREFECT_API_URL pointing to your Cloud workspace and you're good to go
gratitude thank you 1
for OSS, only PREFECT_API_URL