I have the dependency in my go.mod file like below:
require (
...
k8s.io/client-go v0.23.1
)
I deleted the entire vendor folder and tried updating the dependencies like this:
go mod tidy
go mod vendor
But still fake is not present as can be seen from the pic below:
Also from here i can see that the 'fake' pkg is present - https://github.com/kubernetes/client-go/tree/master/kubernetes
just add a blank import statement like:
import (
_ "k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/discovery"
)
and execute the command
go mod vendor
and you will see the expected folder
>ls vendor/k8s.io/client-go/kubernetes/
clientset.go doc.go fake import.go scheme typed