using client-go and apimachinery with go modules

253 views
Skip to first unread message

rapha...@granular.ag

unread,
Jul 1, 2019, 3:42:21 PM7/1/19
to golang-nuts
Can anyone share a working go module file that gets client-go and apimachinery to play nicely? I tried letting go mod determine the versions and I get:


    k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
    k8s.io/client-go v10.0.0+incompatible


Which are incompatible and produce the error from here: https://github.com/kubernetes/client-go/issues/584.

So I tried switching the apimachinery line in my go.mod to 


But then I get:


$ go build
go: finding k8s.io/apimachinery v1.14.3
go: k8s.io/apimac...@v1.14.3: unknown revision v1.14.3
go: error loading module requirements


But that release exists here: https://github.com/kubernetes/apimachinery/releases/tag/kubernetes-1.14.3

I also tried the below two options for apimachinery in go.mod which also both produced errors:

k8s.io/apimachinery/kubernetes v1.14.3
k8s.io/apimachinery kubernetes-v1.14.3

Venkatesh Sundararaj

unread,
Jul 1, 2019, 5:30:28 PM7/1/19
to rapha...@granular.ag, golang-nuts
Below works for me.

 k8s.io/api v0.0.0-20181221193117-173ce66c1e39
k8s.io/apimachinery v0.0.0-20190111195121-fa6ddc151d63
k8s.io/client-go v10.0.0+incompatible

Regards,
Venky
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/d1cb3cba-3dbf-4cf9-b899-86e67419aa09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages