kubebuilder: quickstart fails during go vet step
So i’m on a mac trying to go through the quickstart.
I installed kubebuilder following the instructions but I get the following error during kubebuilder init:
$ kubebuilder init --domain k8s.io --license apache2 --owner "The Kubernetes Authors"
Run `dep ensure` to fetch dependencies (Recommended) [y/n]?
y
dep ensure
Solving failure: package k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1 does not exist within project k8s.io/client-go
2019/04/17 17:48:45 exit status 1
Then I cloned the client-go repo to $GOPAHT/src/k8s.io/ and tried again, only this time I got:
$ kubebuilder init --domain k8s.io --license apache2 --owner "The Kubernetes Authors"
Run `dep ensure` to fetch dependencies (Recommended) [y/n]?
y
dep ensure
Running make...
make
go generate ./pkg/... ./cmd/...
go fmt ./pkg/... ./cmd/...
go vet ./pkg/... ./cmd/...
# k8s.io/client-go/rest
../../../../../pkg/mod/k8s.io/client-go@v11.0.0+incompatible/rest/request.go:598:31: not enough arguments in call to watch.NewStreamWatcher
have (*versioned.Decoder)
want (watch.Decoder, watch.Reporter)
make: *** [vet] Error 2
2019/04/17 17:52:50 exit status 2
/kind bug
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (10 by maintainers)
I had this issue and was able to fix with with go-modules by having my
go.modfile contain:huh. That’s like the universal package manager trick: “when in doubt, clear the package cache”.
Came here from getting a similar issue when trying to build the kubernetes client-go examples (https://github.com/kubernetes/client-go/blob/master/examples/in-cluster-client-configuration/main.go).
The version from @runyontr work for me!
It appears the
depdoesn’t always work well. We are actively working on enablego modulesfor all 3 kubebuilder repos.