k8s-day2-ops icon indicating copy to clipboard operation
k8s-day2-ops copied to clipboard

Error when running script

Open nmarchini opened this issue 4 years ago • 1 comments
trafficstars

I get the following error when trying to run the k8s-toppur.py file

Traceback (most recent call last): File "/Users/myusername/dev/tools/k8s-day2-ops/resource_calcuation/k8s-toppur/k8s-toppur.py", line 7, in <module> from modules.kube_config import KubeConfig File "/Users/myusername/dev/tools/k8s-day2-ops/resource_calcuation/k8s-toppur/modules/kube_config.py", line 1, in <module> from kubernetes import config, client ModuleNotFoundError: No module named 'kubernetes'

I have exported my kubeconfig path to KUBECONFIG.

Can you suggest what the issue is please?

nmarchini avatar Jun 29 '21 22:06 nmarchini

@nmarchini you need to install the dependencies in the env from where you are running the script.

  1. getopt
  2. kubernetes python client
  3. tabulate
  4. packaging
  5. argparse
  6. urllib3

Please install them and try running the script.

dguyhasnoname avatar Jul 05 '21 06:07 dguyhasnoname