https://prefect.io logo
Title
w

Wilson Bilkovich

08/17/2021, 3:48 PM
So, I had a little trouble bootstrapping Prefect Server on Kubernetes. I used the Server Helm chart, then generated a deployment for the agent with the CLI, specifying --rbac and --api The resulting agent gets an error from the server saying that no tenants have been defined, and suggests using the UI to create one. However, the UI doesn’t seem to have any such tab/link.. I had to exec into the server container, install python and prefect, and then do
prefect server create-tenant --name default
Is there a more straightforward way to do that in future deployments?
z

Zanie

08/17/2021, 4:20 PM
Hey @Wilson Bilkovich, there's an optional job in the helm chart to create the tenant for you
# jobs contain one-time job definitions
jobs:

  # create a tenant so that Agent and UI are immediately usable after installation
  createTenant:
    enabled: false
w

Wilson Bilkovich

08/17/2021, 4:34 PM
Oh, I see, so I’d put that in a YAML file and feed it to
-f
at install time? I need to look harder at the knobs on that chart I guess. Thanks!
z

Zanie

08/17/2021, 6:54 PM
You can set helm options without providing a full yaml file as well
Using
--set jobs.createTenant.enabled=true
m

matthias schlögl

09/29/2021, 12:17 PM
I tried that as well, but the create Tenant job returns an error as it is using localhost
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=4200):
Can I somehow set the url for the create tenant job in the helm chart?
Which is defined here