The simplest way to achieve this goal is using KubernetesPodOperator to execute papermill command. For example run_notebook = kubernetes_pod_operator.KubernetesPodOperator( task_id=f"run-notebook", name=f"run-notebook", namespace='default', is_delete_operator_pod=True, image_pull_policy="IfNotPresent", startup_timeout_seconds=3600, cmds=['/bin/bash'], arguments=["-c", """ echo y | conda create --name=runenv python=3.8 source /opt/conda/etc/profile.d/conda.sh conda activate runenv conda install ipykernel python -m ipykernel install --user --name=runenv papermill \ "{{dag_run.conf['nbIn']}}" \ "{{dag_run.conf['nbOut']}}" \ ...