Is there a way to deploy custom Kubernetes CRDs us...
# ask-community
h
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
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.
This is a task.
Copy code
@task
def my_task():
    return 2
h
Oh, yes, I was referring to that when I said Python Task
k
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.
We always accept new tasks in our Task Library if you do create the Kubernetes CRDs deployment 🙂
h
Yes, I'm definitively thinking of creating a Task for that
But for now I'll use a ShellTask and run kubectl inside it, haha
Thanks!