While running a DAG which runs a jar using a docker image,
xcom_push=True is given which creates another container along with the docker image in a sing
If xcom_push is True then KubernetesPodOperator creates one more sidecar container (airflow-xcom-sidecar) in Pod along with the base container(actual worker container).
This sidecar container reads data from /airflow/xcom/return.json and returns as xcom value.
So in your base container you need to write the data you want to return in /airflow/xcom/return.json file.