Symptom:
When we run kubebuilder init, we get below error$kubebuilder init --domain my.domain
2019/05/29 16:23:45 error finding current repository: could not determine repository path from module data, package data, or by initializing a module: go: cannot determine module path for source directory /home/henryxie/go/kubebuilder-src/my.domain/ (outside GOPATH, no import comments)
Solution:
It is due to go mod init is not working properly.To fix it
run go mod init <directory> ie go mod init myfirstcontroller
then kubebuilder init --domain my.domain
No comments:
Post a Comment