Im trying to apply a config file to create a POD from Cloud Compose using the BashOperator
First I tried using the PodOperator but it doesnt allow to pass a spec file, it just builds from the image.
I tried using the BashOperator since the worker already includes gcloud, kubectl, etc. https://cloud.google.com/composer/docs/how-to/using/writing-dags#bashoperator
But every time I run a command I get some error with the arguments or with gcloud sdk.
I tried running single kubectl commands and kubectl is indeed installed on the worker.
I tried setting the config for the cluster before but I got errors on that call too.
job = BashOperator(
task_id='start',
bash_command='kubectl apply -f
/home/airflow/gcs/dags/.../spec.yaml',
env=prodigy_env
)
I expect the pod to be created effectively with the config file but the actual output is
{bash_operator.py:124} INFO - unable to recognize - Path to file
*If you run a cat /path the file indeed exists