https://prefect.io logo
Title
a

Arkady K.

05/26/2021, 9:41 PM
Hi all ! any docs we can find on how to create a tenant in a k8s cluster, our cluster got rebooted over the weekend and we lost our default tenant, one of our team mates is out on vacation, so need help creating a default tenant
k

Kevin Kho

05/26/2021, 9:44 PM
Hi @Arkady K., have you tried this ?
a

Arkady K.

05/26/2021, 9:45 PM
but how does the prefect command know which namespace and cluster to deploy on ? is there a config file we need to change ?
according to k9s and kubectl get svc -n <ournamespace> everything is up, when we try to setup the dashboard, it says the tenant is missing
k

Kevin Kho

05/26/2021, 9:47 PM
I see. I’ll get someone who can help you better than me
a

Arkady K.

05/26/2021, 9:48 PM
Thank you
k

Kevin Kho

05/26/2021, 9:52 PM
It’s a bit late, so I don’t know if anyone is still around. If you don’t get an answer tonight, I’ll be sure to get back to you tom
n

nicholas

05/26/2021, 9:55 PM
Hi @Arkady K. - you should be able to run
kubectl get services --namespace <namespace>
to get the server's external IP address for Apollo. Once you've done that, you can set that in your local
~/.prefect/config.toml
like this:
[server]
  host = "http://<EXTERNAL-IP>"
When you've set that, you should be able to run
prefect backend server && prefect server create-tenant --name default --slug default
The only thing that command is doing is wrapping a graphql mutation to insert a tenant into the database
a

Arkady K.

05/26/2021, 9:57 PM
got it , thank you ! let us try it
n

nicholas

05/26/2021, 9:57 PM
👍 let us know how it goes 🙂