Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying to cloud k8 cluster #2

Open
sadekunle opened this issue May 15, 2020 · 5 comments
Open

Applying to cloud k8 cluster #2

sadekunle opened this issue May 15, 2020 · 5 comments

Comments

@sadekunle
Copy link

Is there any way to apply your apiVersion: extensions.tkestack.io/v1 within the cloud to be able to deploy my configuration? Currently using Google Kubernetes Engine.

@hex108
Copy link
Contributor

hex108 commented May 18, 2020

@sadekunle extensions.tkestack.io/v1 is a CRD. When running bin/cron-hpa-controller --master=127.0.0.1:8080 --v=5 --stderrthreshold=0, it will be created automatically.

More instructions could be found at https://github.com/tkestack/cron-hpa#run

@sadekunle
Copy link
Author

I tried to make build command and received the following error.

hack/build.sh
main.go:31:2: cannot find package "github.com/spf13/pflag" in any of:
/usr/lib/golang/src/github.com/spf13/pflag (from $GOROOT)
/root/go/src/github.com/spf13/pflag (from $GOPATH)
main.go:32:2: cannot find package "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" in any of:
/usr/lib/golang/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset (from $GOROOT)
/root/go/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset (from $GOPATH)
main.go:33:2: cannot find package "k8s.io/apimachinery/pkg/apis/meta/v1" in any of:
/usr/lib/golang/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOROOT)
/root/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOPATH)
main.go:34:2: cannot find package "k8s.io/apimachinery/pkg/util/wait" in any of:
/usr/lib/golang/src/k8s.io/apimachinery/pkg/util/wait (from $GOROOT)
/root/go/src/k8s.io/apimachinery/pkg/util/wait (from $GOPATH)
main.go:35:2: cannot find package "k8s.io/apiserver/pkg/apis/config" in any of:
/usr/lib/golang/src/k8s.io/apiserver/pkg/apis/config (from $GOROOT)
/root/go/src/k8s.io/apiserver/pkg/apis/config (from $GOPATH)
main.go:36:2: cannot find package "k8s.io/client-go/kubernetes" in any of:
/usr/lib/golang/src/k8s.io/client-go/kubernetes (from $GOROOT)
/root/go/src/k8s.io/client-go/kubernetes (from $GOPATH)
main.go:37:2: cannot find package "k8s.io/client-go/rest" in any of:
/usr/lib/golang/src/k8s.io/client-go/rest (from $GOROOT)
/root/go/src/k8s.io/client-go/rest (from $GOPATH)
main.go:38:2: cannot find package "k8s.io/client-go/tools/clientcmd" in any of:
/usr/lib/golang/src/k8s.io/client-go/tools/clientcmd (from $GOROOT)
/root/go/src/k8s.io/client-go/tools/clientcmd (from $GOPATH)
main.go:39:2: cannot find package "k8s.io/client-go/tools/leaderelection" in any of:
/usr/lib/golang/src/k8s.io/client-go/tools/leaderelection (from $GOROOT)
/root/go/src/k8s.io/client-go/tools/leaderelection (from $GOPATH)
main.go:40:2: cannot find package "k8s.io/client-go/tools/leaderelection/resourcelock" in any of:
/usr/lib/golang/src/k8s.io/client-go/tools/leaderelection/resourcelock (from $GOROOT)
/root/go/src/k8s.io/client-go/tools/leaderelection/resourcelock (from $GOPATH)
main.go:41:2: cannot find package "k8s.io/klog" in any of:
/usr/lib/golang/src/k8s.io/klog (from $GOROOT)
/root/go/src/k8s.io/klog (from $GOPATH)
main.go:42:2: cannot find package "k8s.io/kubernetes/pkg/client/leaderelectionconfig" in any of:
/usr/lib/golang/src/k8s.io/kubernetes/pkg/client/leaderelectionconfig (from $GOROOT)
/root/go/src/k8s.io/kubernetes/pkg/client/leaderelectionconfig (from $GOPATH)
main.go:43:2: cannot find package "k8s.io/kubernetes/pkg/controller" in any of:
/usr/lib/golang/src/k8s.io/kubernetes/pkg/controller (from $GOROOT)
/root/go/src/k8s.io/kubernetes/pkg/controller (from $GOPATH)
main.go:26:2: cannot find package "tkestack.io/cron-hpa/pkg/admission" in any of:
/usr/lib/golang/src/tkestack.io/cron-hpa/pkg/admission (from $GOROOT)
/root/go/src/tkestack.io/cron-hpa/pkg/admission (from $GOPATH)
main.go:27:2: cannot find package "tkestack.io/cron-hpa/pkg/client/clientset/versioned" in any of:
/usr/lib/golang/src/tkestack.io/cron-hpa/pkg/client/clientset/versioned (from $GOROOT)
/root/go/src/tkestack.io/cron-hpa/pkg/client/clientset/versioned (from $GOPATH)
main.go:28:2: cannot find package "tkestack.io/cron-hpa/pkg/cronhpa" in any of:
/usr/lib/golang/src/tkestack.io/cron-hpa/pkg/cronhpa (from $GOROOT)
/root/go/src/tkestack.io/cron-hpa/pkg/cronhpa (from $GOPATH)
main.go:29:2: cannot find package "tkestack.io/cron-hpa/pkg/logs" in any of:
/usr/lib/golang/src/tkestack.io/cron-hpa/pkg/logs (from $GOROOT)
/root/go/src/tkestack.io/cron-hpa/pkg/logs (from $GOPATH)
make: *** [build] Error 1

Is there anything specific that needs to be done for the command to execute?

@hex108
Copy link
Contributor

hex108 commented May 20, 2020

@sadekunle You need to clone the repository to the directory /root/go/src/tkestack.io/cron-hpa.

@sadekunle
Copy link
Author

Thank you I was able to execute make build, but I'm getting the following error when running the bin/cron-hpa-controller command.

I0520 15:09:16.423715 13932 controller.go:75] Creating event broadcaster
I0520 15:09:16.424368 13932 discovery.go:215] Invalidating discovery information
E0520 15:09:21.433905 13932 crd.go:70] Error creating CRD cronhpas.extensions.tkestack.io: the server rejected our request for an unknown reason (post customresourcedefinitions.apiextensions.k8s.io)
I0520 15:09:21.433947 13932 controller.go:112] Starting cronhpa controller
I0520 15:09:21.433980 13932 discovery.go:215] Invalidating discovery information
I0520 15:09:21.434004 13932 controller.go:127] Starting sync all
E0520 15:09:21.438168 13932 controller.go:130] Failed to list cronhpas
I0520 15:09:31.438377 13932 controller.go:127] Starting sync all
E0520 15:09:31.442824 13932 controller.go:130] Failed to list cronhpas

Is there is a way to see why the server rejected the request? Since this is a cloud environment there is probably something I'm missing.

@hex108
Copy link
Contributor

hex108 commented May 21, 2020

It is because the permission is denied. Please try this command bin/cron-hpa-controller --kubeconfig=$HOME/.kube/config --v=5 --stderrthreshold=0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants