Hello Prefect Team,
I hope everyone is doing fine !
Recently we have deployed a self-hosted Prefect in our Kubernetes Cluster through helm chart and I am trying to run a Kubernetes Job but facing an issue.
Please let me know if i can get any help from this community and I will post more details about the error over here
j
Jamie Zieziula
10/23/2024, 3:33 PM
hi! can you share the error here?
c
Chaitanya Vats
10/24/2024, 5:50 AM
Sure,
I am trying to run a k8 job using below code:
job = KubernetesJob.from_yaml_file(
credentials=k8s_credentials,
manifest_path="/usr/src/app/sample_file.yaml",
)
# Save the job for reuse
job.save("my-k8s-job", overwrite=True)
@flow
def kubernetes_orchestrator():
run_namespaced_job(job)
and getting below error in when running run_namespaced_job(job):
File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/config/kube_config.py", line 413, in load_and_set
self._load_cluster_info()
File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/config/kube_config.py", line 387, in _load_cluster_info
self.cert_file = FileOrData(
^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/config/kube_config.py", line 81, in init
if data_key_name in obj:
^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.