vmware-archive / kubeless

Kubernetes Native Serverless Framework
https://kubeless.io
Apache License 2.0
6.86k stars 754 forks source link

invalid configuration: no configuration has been provided #1055

Open chen0031 opened 5 years ago

chen0031 commented 5 years ago

Is this a BUG REPORT or FEATURE REQUEST?: Bug What happened:

I have put the config in ~./kube/config, and kubectl can connect the k8s cluster. But kubeless cannot access such a cluster. Don't know why

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

andresmgot commented 5 years ago

What Kubernetes distribution are you using? What's the error you are receiving?

chen0031 commented 5 years ago

What Kubernetes distribution are you using? What's the error you are receiving?

The version of K8S I used is 1.9.3, community version. The error is "cannot find K8S configuration". But I have put the conf in ~/.kube/config.

andresmgot commented 5 years ago

How did you deployed your cluster? Are you using a cloud provider or you deployed yourself with something like Minikube or kubeadm?

By default, kubeless (and kubectl) will try to find the config file in $HOME/.kube/config or wherever the environment variable KUBECONFIG points to, maybe that variable is pointing somewhere else?

The error is "cannot find K8S configuration"

Is that the exact error message you are receiving? I would need the real error in order to debug where it comes from.

msrinivascharan commented 4 years ago

My case, after i logged in as right user, i am able to run kubectl without error "error: no configuration has been provided, try setting KUBERNETES_MASTER environment variable". thanks @andresmgot

aa-glitch commented 4 years ago

what should KUBERNETES_MASTER me setup to?

andresmgot commented 4 years ago

@msrinivascharan @aa-glitch I am not aware of any issue that requires to set KUBERNETES_MASTER. Maybe it's something specific to the k8s distribution that you are using, which one are you using? What's the authentication method used?

kolly83 commented 4 years ago

Hello Guys

I have the same issue.

When I ssh to my Jenkins node I am able to run kubectl config use-context arn:aws:eks:eu-west-1:xxxxx:cluster/EKS-Infra and these ones too: kubectl get nodes & kubectl get svc but when I want to run the kubectl config use-context arn:aws:eks:eu-west-1:xxxxx:cluster/EKS-Infra from my Jenkins pipleine (Github+Jenkinsfile) I've got that message:

error: no context exists with the name: "arn:aws:eks:eu-west-1:xxxxxx:cluster/EKS-Infra"

Any idea?

Thank you.