Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Latest version of kubernetes python module doesn't work in kubeless functions #11

@tompizmor

Description

@tompizmor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions