Hi, we are setting up Prefect in Kubernetes using ...
# prefect-getting-started
d
Hi, we are setting up Prefect in Kubernetes using a private docker repo to pull our images. Normally when we roll our services in Kubernetes we can specify imagePullSecrets in the deployment yaml, but we are struggling to know how to let the worker know (or define on the deployment itself) how to use the secrets which we have set up in our cluster, and which we know work for other non-prefect services. Any help would be much appreciated.
b
Hi Dan! You should be able to configure
imagePullSecrets
in the k8s work pool in the UI. It isn't a default setting in the work pool base template, so you'll need to manually surface it by editing the advanced tab (which is next to the base template when you go to edit/create the work pool). In this guide for deploying flows using k8s, go to the "Advanced tab" tip box to see how one goes about modifying the work pool base template.
Here's an example of what this could look like:
Copy code
"imagepullsecret": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "name"
          ],
          "properties": {
            "name": {
              "type": "string"
            }
          }
        },
and the reference in the job spec could look like this:
Copy code
"imagePullSecrets": "{{ imagepullsecret }}"
Which raises a new field in the k8s work pool
Once this field is available, you could even override the value on a per-flow basis using job variables
d
Thank you for this. We are trying but still cannot authenticate so I guess something wrong with how we have configured this
Hi we got this working - had the imagePullSecrets in the wrong place in the temple. Thanks so much for your help.
1
🎊 1
🦜 1