Skip to content

Failed to create api #5624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zhaowei413 opened this issue Apr 1, 2022 · 1 comment
Closed

Failed to create api #5624

zhaowei413 opened this issue Apr 1, 2022 · 1 comment

Comments

@zhaowei413
Copy link

zhaowei413 commented Apr 1, 2022

Bug Report

I get this bug info when I try command "operator-sdk create api --group ship --version v1 --kind Frigate".
I do not know the cause for this issue. This is just a example in help doc.

"failed to create API: unable to load configuration file: unable to load the configuration: unable to read "PROJECT" file: open PROJECT: no such file or directory"

My environment is bellow:

#kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:38:50Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}

#go version
go version go1.18 linux/amd64

#operator-sdk version
operator-sdk version: "v1.16.0", commit: "560044140c4f3d88677e4ef2872931f5bb97f255", kubernetes version: "1.21", go version: "go1.16.13", GOOS: "linux", GOARCH: "amd64"

#uname -a
Linux 214hub 3.10.0-1127.19.1.rt56.1116.el7.x86_64 #1 SMP PREEMPT RT Thu Aug 27 11:56:30 CEST 2020 x86_64 x86_64 x86_64 GNU/Linux

#docker version
Client: Docker Engine - Community
Version: 20.10.11
API version: 1.41
Go version: go1.16.9
Git commit: dea9396
Built: Thu Nov 18 00:38:53 2021
OS/Arch: linux/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 20.10.11
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9

@zhaowei413
Copy link
Author

zhaowei413 commented Apr 1, 2022

I have found the reason, I should first "operator-sdk init " a project.
BTW, I have to down grade go to version 1.16 from 1.18, or I will failed when command "operator-sdk create api --version=v1 --kind=AppService", the error info is "FATA[0002] failed to create API: unable to inject the resource to "base.go.kubebuilder.io/v3": API resource already exists ".

please close this issue, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant