- 
                Notifications
    
You must be signed in to change notification settings  - Fork 15.9k
 
Closed
Labels
area:corearea:providerskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yetprovider:cncf-kubernetesKubernetes (k8s) provider related issuesKubernetes (k8s) provider related issues
Description
Apache Airflow version
3.1.0
If "Other Airflow 2 version" selected, which one?
No response
What happened?
Using KubernetesPodOperator in Airflow 3 generates some not-useful warning/errors.
While running KubernetesPodOperator and using default kubernetes connection id "kubernetes_default", the Kubernetes hook will fallback to cluster-derived credentials:
airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py
Line 183 in 767ae70
| return Connection(conn_id=cls.default_conn_name) | 
This works as expected, but generates warning/error messages - see screenshot above.
What you think should happen instead?
No response
How to reproduce
- Run Airflow 3 instance
 - Deploy DAG
 
import datetime
from airflow import models
from airflow.providers.cncf.kubernetes.operators.pod import KubernetesPodOperator
with models.DAG(
    dag_id="kpo_simple_echo",
    schedule=None,
    start_date=datetime.datetime(2000, 1, 1),
) as dag:
  KubernetesPodOperator(
      task_id="kpo_simple_echo",
      name="kpo-simple-echo",
      cmds=["bash"],
      arguments=["-c", "echo ZZZZZZZ"],
      image="gcr.io/gcp-runtimes/ubuntu_20_0_4",
      config_file="{path to kube config}",
  )
- Observe logs
 
Operating System
linux
Versions of Apache Airflow Providers
No response
Deployment
Google Cloud Composer
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
 
Code of Conduct
- I agree to follow this project's Code of Conduct
 
Metadata
Metadata
Assignees
Labels
area:corearea:providerskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yetprovider:cncf-kubernetesKubernetes (k8s) provider related issuesKubernetes (k8s) provider related issues