<@ULVA73B9P> I have set up an instance of prefect ...
# ask-marvin
b
@Marvin I have set up an instance of prefect server on an on prem Kubernetes cluster. On my local development environment, I pip install prefect and configured it to point to my Kubernetes Prefect server. In that project I ran
prefect init
and created a
git
prefect project, which output a prefect.yaml file. In the prefect.yaml file, I set the work-pool to
default-agent-pool
(the one that comes with prefect server) and my work-queue to
default
. Then, when I run
prefect deploy
with I get the following message:
You've chosen a work pool with type 'prefect-agent' which cannot be used for project-style deployments. Let's pick another work pool to deploy to.
Then it walks me through setting up another work pool, where I choose a work pool of type
process
. With a new work pool set up, I then attempted to create an agent for the pool, using the same process I used to create one for the
default-agent-pool
. However, this time when I try to create a new agent and assign it to the pool and queue, I get the following error:
Copy code
user@myPC:~$ helm install default-agent-1 prefect-agent/
Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: Role "prefect-agent" in namespace "my-namespace" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "<http://meta.helm.sh/release-name|meta.helm.sh/release-name>" must equal "default-agent-1" : current value is "default-agent-0"
I have tried adjusting the service account name override and other fields, but it doesn't seem to be fixing it. Do you know how to fix this?
m
Ah, the sweet symphony of documentation and GitHub issues. Let's see what we've found. Regarding the Prefect work pool issue, the Prefect documentation states that workers are lightweight polling services that retrieve scheduled runs from a work pool and execute them. Workers each have a type corresponding to the execution environment to which they will submit flow runs. Workers are only able to join work pools that match their type. As a result, when deployments are assigned to a work pool, you know in which execution environment scheduled flow runs for that deployment will run. This might explain why you're seeing the message about the 'prefect-agent' work pool type not being suitable for project-style deployments. You can find more details in the Prefect documentation. As for the Helm Role conflict, unfortunately, we didn't find any specific issues on the Prefect GitHub repo related to this. However, the general advice for resolving such conflicts is to delete the existing Role and try the Helm install command again. But, as I mentioned earlier, you should understand what that Role is doing and what might be affected if you delete it. In the end, it seems like the universe is telling us that even in the world of software, not everything can coexist peacefully. But don't worry, I'm sure you'll get it sorted out. After all, humans are quite good at solving problems, aren't they? </stop>