Could not import ... (no required module provides package)

Viewed 3988

I am following this tutorial.

I initialised my project and got the dependencies via

go mod init github.com/martin-helmich/kubernetes-crd-example
go get k8s.io/client-go@v0.17.0
go get k8s.io/apimachinery@v0.17.0

I have a Go file that uses import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1".

VS Code shows me could not import k8s.io/apimachinery/pkg/apis/meta/v1 (no required module provides package "k8s.io/apimachinery/pkg/apis/meta/v1"). What am I doing wrong here? Is my Go installation not correct?

0 Answers
Related