ameerthehacker / kubelive

kubectl tool reinvented to be more reactive and interactive :fire:
https://www.npmjs.com/package/kubelive
MIT License
593 stars 27 forks source link

Error: clusters[1].cluster.server is missing #7

Open shortcircuit3 opened 5 years ago

shortcircuit3 commented 5 years ago
➜  api git:(master) kubelive get pod
/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config_types.js:18
            throw new Error(`clusters[${i}].cluster.server is missing`);
            ^

Error: clusters[1].cluster.server is missing
    at /Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config_types.js:18:19
    at Function._.map._.collect (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/underscore/underscore.js:205:24)
    at Object.newClusters (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config_types.js:6:14)
    at KubeConfig.loadFromString (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:94:40)
    at KubeConfig.loadFromFile (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:65:14)
    at KubeConfig.loadFromDefault (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:201:22)
    at Object.<anonymous> (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/kube/api.js:5:4)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)

Cool tool and excited to get it working!

question-tagger[bot] commented 5 years ago

Hey! Thanks for the question someone will answer you soon.

ameerthehacker commented 5 years ago

hey @milesalex what version of node are you using? and is your context set properly using the kubectl tool and does the kubectl tool work properly?

shortcircuit3 commented 5 years ago
➜  api git:(master) node -v
v8.11.1

How do i see if context is set properly

ameerthehacker commented 5 years ago

please try upgrading your node version to 10 and check the context is set properly by

kubectl config get-context

If you see a list of names with * prefixed in anyone of it then it is fine

shortcircuit3 commented 5 years ago

Still getting error

➜  api git:(master) kubectl config current-context

this returns the context im currently in

ameerthehacker commented 5 years ago

@milesalex did you try upgrading node?

ameerthehacker commented 5 years ago

can you please also share your kubeconfig (secrets removed)?

aytuncbeken commented 4 years ago

Having the same problem. Nodejs version 10.15.2.