Airflow no module named 'kubernetes'

3/5/2019

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?

-- Paymahn Moghadasian
airflow
kubernetes

1 Answer

3/5/2019

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

-- Paymahn Moghadasian
Source: StackOverflow