<p>Im Trying to pass a Xcom value as arguments inside a kubernetes pod operator But values are not populating.</p>
<p>Checked Xcom's List in Airflow UI I am able to see the key,value.</p>
<p>This is my syntax:</p>
<pre><code>get_report_task = kubernetes_pod_operator.KubernetesPodOperator(
    task_id=&quot;get_report_task&quot;,
    name=&quot;%s&quot; % (DAG_ID.replace(&quot;_&quot;, &quot;-&quot;)),
    namespace=&quot;dsm-kl&quot;,
    image=KUBER_IMAGE,
    image_pull_policy=&quot;Always&quot;,
    is_delete_operator_pod=True,
    arguments=[&quot;{ti.xcom_pull(dag_id='{DAG_ID}', task_ids='push_task', key='kube_values')}&quot;],
    labels={
        &quot;vendor&quot;: &quot;reversal&quot;,
        &quot;job&quot;: &quot;get_reports&quot;,
        &quot;dag&quot;: DAG_ID,
        &quot;task&quot;: &quot;get_report_task&quot;,
        &quot;task_id&quot;: &quot;get_report_task&quot;,
    },
    retries=3,
    depends_on_past=False,
    dag=dag,
    resources={&quot;request_memory&quot;: &quot;512Mi&quot;, &quot;limit_memory&quot;: &quot;1024Mi&quot;},
    affinity=DOC_AFFINITY,
)
</code></pre>
<p>Any Syntax Would be Helpful
Thanks in advance.</p>

Mark Antony
<p>To use jinja template, you need to put the code between <code>{{&lt;code&gt;}}</code>, and you cannot use jinja in jija as you do to access dag id <code>{DAG_ID}</code>. When you want to read xcom from a task in the same dag, you don't need to provide the dag id:</p>
<pre class="lang-py prettyprint-override"><code>get_report_task = kubernetes_pod_operator.KubernetesPodOperator(
    task_id=&quot;get_report_task&quot;,
    name=&quot;%s&quot; % (DAG_ID.replace(&quot;_&quot;, &quot;-&quot;)),
    namespace=&quot;dsm-kl&quot;,
    image=KUBER_IMAGE,
    image_pull_policy=&quot;Always&quot;,
    is_delete_operator_pod=True,
    arguments=[&quot;{{ti.xcom_pull(task_ids='push_task', key='kube_values')}}&quot;],
    labels={
        &quot;vendor&quot;: &quot;reversal&quot;,
        &quot;job&quot;: &quot;get_reports&quot;,
        &quot;dag&quot;: DAG_ID,
        &quot;task&quot;: &quot;get_report_task&quot;,
        &quot;task_id&quot;: &quot;get_report_task&quot;,
    },
    retries=3,
    depends_on_past=False,
    dag=dag,
    resources={&quot;request_memory&quot;: &quot;512Mi&quot;, &quot;limit_memory&quot;: &quot;1024Mi&quot;},
    affinity=DOC_AFFINITY,
)
</code></pre>
