title: What am I doing wrong in this DAG setup for KubernetesPodOperator
body: <p>I found the following Airflow DAG in this <a href="https://kubernetes.io/blog/2018/06/28/airflow-on-kubernetes-part-1-a-different-kind-of-operator/" rel="noreferrer">Blog Post</a>:</p>
  
  <pre><code>from airflow import DAG
  from datetime import datetime, timedelta
  from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator
  from airflow.operators.dummy_operator import DummyOperator
  
  
  default_args = {
      'owner': 'airflow',
      'depends_on_past': False,
      'start_date': datetime.utcnow(),
      'email': ['airflow@example.com'],
      'email_on_failure': False,
      'email_on_retry': False,
      'retries': 1,
      'retry_delay': timedelta(minutes=5)
  }
  
  dag = DAG(
      'kubernetes_sample', default_args=default_args, schedule_interval=timedelta(minutes=10))
  
  
  start = DummyOperator(task_id='run_this_first', dag=dag)
  
  passing = KubernetesPodOperator(namespace='default',
                            image="Python:3.6",
                            cmds=["Python","-c"],
                            arguments=["print('hello world')"],
                            labels={"foo": "bar"},
                            name="passing-test",
                            task_id="passing-task",
                            get_logs=True,
                            dag=dag
                            )
  
  failing = KubernetesPodOperator(namespace='default',
                            image="ubuntu:1604",
                            cmds=["Python","-c"],
                            arguments=["print('hello world')"],
                            labels={"foo": "bar"},
                            name="fail",
                            task_id="failing-task",
                            get_logs=True,
                            dag=dag
                            )
  
  passing.set_upstream(start)
  failing.set_upstream(start)
  </code></pre>
  
  <p>and before I attempted to add anything custom to it ... attempted to run it as is.  However, the code seems to timeout in my airflow environment.</p>
  
  <p>Per documentation <a href="https://cloud.google.com/composer/docs/how-to/using/using-kubernetes-pod-operator" rel="noreferrer">here</a> I attempted to set <code>startup_timeout_seconds</code> to something ridiculous like 10m ... but still got the the timeout message described in the documentation:</p>
  
  <pre><code>[2019-01-04 11:13:33,360] {pod_launcher.py:112} INFO - Event: fail-7dd76b92 had an event of type Pending
  Traceback (most recent call last):
    File "/usr/local/bin/airflow", line 6, in &lt;module&gt;
      exec(compile(open(__file__).read(), __file__, 'exec'))
    File "/usr/local/lib/airflow/airflow/bin/airflow", line 27, in &lt;module&gt;
      args.func(args)
    File "/usr/local/lib/airflow/airflow/bin/cli.py", line 392, in run
      pool=args.pool,
    File "/usr/local/lib/airflow/airflow/utils/db.py", line 50, in wrapper
      result = func(*args, **kwargs)
    File "/usr/local/lib/airflow/airflow/models.py", line 1492, in _run_raw_task
      result = task_copy.execute(context=context)
    File "/usr/local/lib/airflow/airflow/contrib/operators/kubernetes_pod_operator.py", line 123, in execute
      raise AirflowException('Pod Launching failed: {error}'.format(error=ex))
  airflow.exceptions.AirflowException: Pod Launching failed: Pod took too long to start
  </code></pre>
  
  <p>Any Input would be appreciated.</p>