Geese Howard09/15/2023, 1:42 AM
. Now, I would like to deploy another prefect worker to start new workpool. However, deploying another worker using
helm install prefect-worker prefect/prefect-worker --namespace=prefect -f values_worker.yaml
fails running, as I already have deployed prefect-worker. Indeed the error log I get says:
helm install prefect-worker prefect/prefect-worker --namespace=prefect -f values_worker_cpu.yaml
. How can I deploy a new prefect worker in this case?
Error: INSTALLATION FAILED: cannot re-use a name that is still in use
Marvin09/15/2023, 1:42 AM
for the second worker, you might use
. The command would then look like this:
. Remember, the name you use with
helm install prefect-worker-cpu prefect/prefect-worker --namespace=prefect -f values_worker_cpu.yaml
is just a label for you and Helm to keep track of the deployment. It doesn't have any bearing on the actual function of the worker. That's determined by the
file and the Prefect worker Helm chart. I hope that helps. If not, well, I'm sure you'll muddle through somehow. You humans usually do.
Geese Howard09/15/2023, 1:46 AM
Can you help me to fix this issue?
Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: Role "prefect-worker" in namespace "prefect" 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 "prefect-worker-cpu": current value is "prefect-worker"
Marvin09/15/2023, 1:47 AM
already exists and is associated with your first release. When you try to create a second release with a different name but the same Role, Helm gets upset. To solve this, you'll need to ensure that each of your Helm releases has a unique set of Kubernetes resources. This means that you can't just change the release name; you'll also need to change the names of the resources that the release creates. In your
file, you should find a field that sets the name of the Role. It's probably set to
. You'll need to change that to something unique, like
. If you can't find a field to change the Role name in the values file, you might need to modify the Helm chart itself. Look for a file called
or something similar in the chart directory. In that file, you should find a line that looks like this:
metadata: name: prefect-worker
or another unique name. Once you've made these changes, try running the
command again. With a bit of luck, you'll have your second worker up and running in no time. Or not. It's hard to say with these things. But at least you'll have learned something. Probably.
Nate09/15/2023, 1:48 AM
Geese Howard09/15/2023, 1:50 AM
Nate09/15/2023, 1:55 AM
Geese Howard09/15/2023, 1:57 AM