Using golang 1.12.1 getting exception as
# k8s.io/client-go/rest
../../../../pkg/mod/k8s.io/[email protected]+incompatible/rest/request.go:598:31: not enough arguments in call to watch.NewStreamWatcher
have (*versioned.Decoder)
want (watch.Decoder, watch.Reporter)
Compilation finished with exit code 2
Make sure you are using the kubernetes-1.14.0 tag of k8s.io/apimachinery, not master
/close
@liggitt: Closing this issue.
In response to this:
Make sure you are using the kubernetes-1.14.0 tag of k8s.io/apimachinery, not master
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
I took me a while to get this:
https://github.com/kubernetes/client-go/blob/master/INSTALL.md#go-modules
➜ apimachinery git:(86fb29e) git checkout kubernetes-1.14.0-beta.1
Previous HEAD position was 86fb29e Merge pull request #74102 from caesarxuchao/automated-cherry-pick-of-#73443-#73713-#73805-#74000-upstream-release-1.13
HEAD is now at bbd8f4d Merge remote-tracking branch 'origin/master' into release-1.14. Deleting CHANGELOG-1.10.md CHANGELOG-1.11.md CHANGELOG-1.12.md CHANGELOG-1.4.md CHANGELOG-1.7.md CHANGELOG-1.8.md CHANGELOG-1.9.md
➜ fist git:(gomod) ✗ go build
# k8s.io/client-go/rest
../../../../pkg/mod/k8s.io/[email protected]+incompatible/rest/request.go:598:31: not enough arguments in call to watch.NewStreamWatcher
have (*versioned.Decoder)
want (watch.Decoder, watch.Reporter)
Seems 1.14 also not work
@fanux I got the same issue on 1.14. And I just follow innovia step by step and got all dependencies. It works for me
I see there was a semantic versioning scheme. For example, client-go 9.0.0 matches the Kubernetes 1.12 release, client-go 10.0.0 matches Kubernetes 1.13, and so on.
same issue. with.
k8s.io/client-go v11.0.0+incompatible
and go version
go version go1.13.4 darwin/amd64
Following the instructions at https://github.com/kubernetes/client-go/blob/master/INSTALL.md#go-modules will help you make use of compatible versions of all k8s.io dependencies. As of Kubernetes 1.16.4, there are semver tags (v0.16.4) for client-go/api/apimachinery repos that make it easier to verify you have matching versions.
I set k8s.io/client-go v0.17.0 in my go.mod and it started working.
In my case I had to add a replace stanza as well like the folllowing
// Pin k8s deps to 1.17.6
replace (
k8s.io/api => k8s.io/api v0.17.6
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.6
k8s.io/apimachinery => k8s.io/apimachinery v0.17.6
k8s.io/apiserver => k8s.io/apiserver v0.17.6
k8s.io/client-go => k8s.io/client-go v0.17.6
k8s.io/code-generator => k8s.io/code-generator v0.17.6
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
)
Most helpful comment
I took me a while to get this:
https://github.com/kubernetes/client-go/blob/master/INSTALL.md#go-modules