Is there a way to deploy custom Kubernetes CRDs using the K8s Task Library?
I'm trying to deploy a SparkApplication CRD but *i*t seems that there is no task that accomplishes this.
Should I use the kubernetes-python inside a Python Task instead?
Thanks
k
Kevin Kho
04/09/2021, 3:37 PM
Hey @Hygor Knust! You’re not confined to our Task Library. You can just wrap a Python function as a task with the
@task
decorator. You don’t need to use the Python Task.
Kevin Kho
04/09/2021, 3:37 PM
This is a task.
Copy code
@task
def my_task():
return 2
h
Hygor Knust
04/09/2021, 3:38 PM
Oh, yes, I was referring to that when I said Python Task
k
Kevin Kho
04/09/2021, 3:38 PM
Oh then yes just wrap your code into a task with the decorator syntax and call it in the Flow and that would achieve what you want.
Kevin Kho
04/09/2021, 3:39 PM
We always accept new tasks in our Task Library if you do create the Kubernetes CRDs deployment 🙂
h
Hygor Knust
04/09/2021, 3:40 PM
Yes, I'm definitively thinking of creating a Task for that
Hygor Knust
04/09/2021, 3:40 PM
But for now I'll use a ShellTask and run kubectl inside it, haha
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.