jvstein commented on issue #8792:
URL: https://github.com/apache/airflow/issues/8792#issuecomment-699188062
@Shivarp1 - You're not allowed to pass `RUN` statements into the operator.
You need to start with a pre-built image.
Try this task definition:
```
task = KubernetesPodOperator(
dag=dag,
task_id="xcom_test",
name="test_xcom_failure",
namespace="default",
in_cluster=False,
config_file="/path/to/kube/config",
is_delete_operator_pod=True,
image_pull_policy="IfNotPresent",
image="alpine:3.12",
do_xcom_push=True,
retries=0,
cmds=["/bin/sh", "-c"],
arguments=["mkdir -p /airflow/xcom; echo '{\"success\": false}' | tee
/airflow/xcom/return.json; exit 1"],
)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]