Paymahn Moghadasian
Paymahn Moghadasian

Reputation: 10329

Airflow no module named 'kubernetes'

Answer My Own Question

I recently upgraded to Airflow 1.10 which introduced the KubernetesPodOperator however whenever I use it I see the following error in the webserver: No module named 'kubernetes'. Why does this happen and how can I fix it?

Upvotes: 7

Views: 6206

Answers (2)

Blessy
Blessy

Reputation: 520

For airflow 1.10.4,

pip install 'apache-airflow[cncf.kubernetes]'

Upvotes: 2

Paymahn Moghadasian
Paymahn Moghadasian

Reputation: 10329

This happens because the kubernetes library isn't installed with vanilla airflow. You can fix this by running pip install "apache-airflow[kubernetes]".

Upvotes: 14

Related Questions