Tony Yun
10/01/2021, 2:36 PMThe secret KUBERNETES_API_KEY was not found
when trying to run a Kubernetes Task. I thought I’m using in-cluster connection so it shouldn’t be required? Otherwise is there any recommendation on creating a ``KUBERNETES_API_KEY` ?
according to: https://docs.prefect.io/api/latest/tasks/kubernetes.html#createnamespaceddeployment
Attempt to use a Prefect Secret that contains a Kubernetes API Key. If=kubernetes_api_key_secret
then it will attempt the next two connection methods. By default the value isNone
so providingKUBERNETES_API_KEY
acts as an override for the remote connection. 2. Attempt in-cluster connection (will only work when running on a Pod in a cluster) 3. Attempt out-of-cluster connection using the default location for a kube config fileNone
Kevin Kho
Tony Yun
10/01/2021, 2:42 PMprefect agent kubernetes start
Tony Yun
10/01/2021, 2:43 PMdbt-run
) locally without prefect fine:Tony Yun
10/01/2021, 2:44 PMKevin Kho
KUBERNETES_API_KEY
, maybe you just want kubernetes_api_key_secret=None
so that it uses the in-cluster connection?Tony Yun
10/01/2021, 2:47 PMTony Yun
10/01/2021, 2:48 PMKevin Kho
CreateNamespacedDeployment
Tony Yun
10/01/2021, 2:56 PMTony Yun
10/01/2021, 2:57 PMCreateNamespacedPod
but it also kicked off to run the job. what’s the difference to RunNamespacedPod
task then?Kevin Kho
Tony Yun
10/01/2021, 2:59 PMTony Yun
10/01/2021, 2:59 PMKevin Kho
Tony Yun
10/01/2021, 3:01 PMTony Yun
10/01/2021, 3:03 PMTony Yun
10/01/2021, 3:04 PM