d

    David Car

    1 year ago
    Quick question. Can multiple agents share the same auth token or does each have to have their own? For example, if I generate the auth token and use that for a K8S agent deployment with a replicaset of 5, can I create that deployment using that one token? Doing that only shows one agent in the Prefect Cloud server even though 5 pods exist. Thanks.
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    Agents are identified in the backend by a tuple of their
    name
    ,
    type
    ,
    prefect version
    , and
    labels
    . If these are identical across multiple agents, then cloud will only see one agent.
    Note that there's no real reason to run multiple of the same agent. Prefect scalability isn't limited by the number of running agents, so running 5 k8s agents won't make your flows run faster.
    Usually we recommend a
    Deployment
    of 1, so you'll still get restarts but don't have duplicate agents floating about.
    d

    David Car

    1 year ago
    Right, that makes sense. I wasn't thinking that through. A deployment of one is all that is needed. Perfect. Thanks.