0

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:

Vendor content of k8s.io

Also from here i can see that the 'fake' pkg is present - https://github.com/kubernetes/client-go/tree/master/kubernetes

1
  • 2
    What is that picture supposed to be showing us? Do you have a compilation error? If you don't import a package, it is not required to be stored anywhere.
    – JimB
    Jan 5, 2022 at 14:28

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.