functions
functions copied to clipboard
Latest version of `kubernetes` python module doesn't work in kubeless functions
After installing the latest kubernetes python module (3.0.0), when the function is going to load it, it throws this error:
Traceback (most recent call last):
File "/kubeless.py", line 10, in <module>
'/kubeless/%s.py' % os.getenv('MOD_NAME'))
File "/kubeless/tweet.py", line 4, in <module>
from kubernetes import client, config
File "/opt/kubeless/pythonpath/lib/python2.7/site-packages/kubernetes/__init__.py", line 16, in <module>
import kubernetes.config
File "/opt/kubeless/pythonpath/lib/python2.7/site-packages/kubernetes/config/__init__.py", line 17, in <module>
from .kube_config import (list_kube_config_contexts, load_kube_config,
File "/opt/kubeless/pythonpath/lib/python2.7/site-packages/kubernetes/config/kube_config.py", line 21, in <module>
import google.auth
ImportError: No module named google.auth
Manually installing the module google.auth module with this command pip install google.auth makes the function to work but adding that module to the requirements.txt file for a function does not solve the issue.
The kubernetes module 2.0.0 version works fine.