kubeless icon indicating copy to clipboard operation
kubeless copied to clipboard

invalid configuration: no configuration has been provided

Open chen0031 opened this issue 5 years ago • 7 comments

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:

  • Kubernetes version (use kubectl version):
  • Kubeless version (use kubeless version):
  • Cloud provider or physical cluster:

chen0031 avatar Jun 30 '19 12:06 chen0031

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

andresmgot avatar Jul 01 '19 09:07 andresmgot

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.

chen0031 avatar Jul 01 '19 23:07 chen0031

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.

andresmgot avatar Jul 02 '19 07:07 andresmgot

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

msrinivascharan avatar Apr 27 '20 14:04 msrinivascharan

what should KUBERNETES_MASTER me setup to?

aa-glitch avatar May 15 '20 22:05 aa-glitch

@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?

andresmgot avatar May 18 '20 09:05 andresmgot

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.

kolly83 avatar May 19 '20 19:05 kolly83