kubeless
kubeless copied to clipboard
Unable connect to cluster using exec credential
Is this a BUG REPORT or FEATURE REQUEST?: BUG REPORT (worked see her #836) What happened: Unable to connect to a cluster using exec credentials.
>kubeless function list
FATA[0000] Can not list functions: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1beta1"
What you expected to happen: getting the functions on the cluster
How to reproduce it (as minimally and precisely as possible):
- create a cluster with kubespray
- use a exec credential to authenticate
- try to get the functions on the cluster with kubeless
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version
):
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-19T22:12:47Z", GoVersion:"go1.12.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
- Kubeless version (use
kubeless version
):
Kubeless version: v1.0.3
- Cloud provider or physical cluster: physical deployed with kubespray
Hi @Phill93,
It seems that the problem is that in Kubernetes 1.14 the API version has changed from client.authentication.k8s.io/v1beta1
to client.authentication.k8s.io/v1
. We would need to update the Kubernetes libraries used in Kubeless in order to use the new endpoint.
If i change the api version in my kubectl config to v1. I can not connect to my cluster anymore with this error: kubectl:
error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1"
kubeless:
FATA[0000] Can not list functions: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1"
Is it possible to update the Kubernetes libaries easily?
Is it possible to update the Kubernetes libaries easily?
It is not trivial. It will probably require changes in the code to use the new endpoints.
i have the same issue. any update for this?
we have not worked on updating these libraries, are you also using kubespray or a different platform @hbinduni ?
i use kubernetes from digitalocean and got this issue when i try to run kubeless function ls
and also i have the same exatly issue when using fission
. below my version:
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-20T04:49:16Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:19:22Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
I see, yes, it's likely the same issue, we would need to upgrade client-go
and the kubernetes libraries so platforms that doesn't support client.authentication.k8s.io/v1beta1
are usable.
It seems that the problem is that in Kubernetes 1.14 the API version has changed from
client.authentication.k8s.io/v1beta1
toclient.authentication.k8s.io/v1
.
Where are you seeing that? v1alpha1 and v1beta1 are the currently supported versions (see https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go#L66-L70)
in your kubeconfig file, what apiVersion
is set in the user exec config? setting that to client.authentication.k8s.io/v1alpha1
would allow working with the level of client-go currently vendored in kubeless:
https://github.com/kubeless/kubeless/blob/master/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go#L55-L58
(note that the particular exec plugin you are using may or may not support the alpha exec version)
The best solution would be for kubeless to update to current client-go library versions to allow all supported exec plugins to work
Hello, any update on this matter ? I am experimenting the same problem with Kubernetes v1.14.1 and trying with kubeless from v1.0.5 to 1.0.7
bump
I did a bit of digging and the current supported Kubernetes clusters in cloud providers I'd be interested in using:
If this is the issue:
It seems that the problem is that in Kubernetes 1.14 the API version has changed from client.authentication.k8s.io/v1beta1 to client.authentication.k8s.io/v1. We would need to update the Kubernetes libraries used in Kubeless in order to use the new endpoint.
It might be time to give this update a higher priority. I currently want to run kubeless on digital ocean but unfortunately can not.
@gcmurphy I'm also stuck, and I'm also running Kubernetes on Digitalocean. Any luck in how to fix this issue?