Operator-sdk: unknown command "new" for "operator-sdk"

Created on 19 Aug 2020  Â·  15Comments  Â·  Source: operator-framework/operator-sdk

➜ example-inc operator-sdk new memcached-operator
Error: unknown command "new" for "operator-sdk"
Run 'operator-sdk --help' for usage.
FATA[0000] unknown command "new" for "operator-sdk"

➜ example-inc operator-sdk version
operator-sdk version: "v1.0.0", commit: "d7d5e0cd6cf5468bb66e0849f08fda5bf557f4fa", kubernetes version: "v1.18.2", go version: "go1.14.7 darwin/amd64", GOOS: "darwin", GOARCH: "amd64"

aredownstream

All 15 comments

was just about to report the same issue
documentation is not aligned with the actual sdk (on both version 4.3 and 4.5)
should use "init" instead of "new"

I think I found the solution
the documentation of openshift shows documentation of an older version of the operator-sdk - this is very confusing
the latest documentation for operator-sdk is here:
https://sdk.operatorframework.io/docs/building-operators/golang/quickstart/

The openshift docs are not related to the 1.0.0. I'd recommend you follow up the website.
Could you please also share the links for the OCP docs?

@arivatibm Sorry for the confusion. Yes, you've hit a wart in our process. The operator-sdk is currently delivered as an upstream project and released as such. Because we want it to work with OpenShift the OpenShift documentation will reference it. The problem is that the OpenShift documentation usually reference an older version.

We are working on solving this so there will likely be one that is shipped on a cadence closer to the OpenShift release and documented there. While the upstreams releases will be documented upstream. The v0.19.x release is probably the closest to match the OpenShift documentation. You can find that release here: https://github.com/operator-framework/operator-sdk/releases/tag/v0.19.2

will an operator created with version 1.0.0 of operator SDK work on an OCP 4.3 cluster?
 
Regards,
 
Ari Volcoff Research Staff Member IBM - Haifa Research Lab
"Make everything as simple as possible, but not simpler." - Albert Einstein  
Mobile: +972-58-4168357 | Phone: +972-4-8281319 E-mail: [email protected] LinkedIn: https://il.linkedin.com/in/avolcoff
 
 
----- Original message -----From: Jesus Rodriguez notifications@github.comTo: operator-framework/operator-sdk operator-sdk@noreply.github.comCc: arivatibm ariv@il.ibm.com, Mention mention@noreply.github.comSubject: [EXTERNAL] Re: [operator-framework/operator-sdk] unknown command "new" for "operator-sdk" (#3758)Date: Thu, Aug 20, 2020 4:02 AM 
 
@arivatibm Sorry for the confusion. Yes, you've hit a wart in our process. The operator-sdk is currently delivered as an upstream project and released as such. Because we want it to work with OpenShift the OpenShift documentation will reference it. The problem is that the OpenShift documentation usually reference an older version.
We are working on solving this so there will likely be one that is shipped on a cadence closer to the OpenShift release and documented there. While the upstreams releases will be documented upstream. The v0.19.x release is probably the closest to match the OpenShift documentation. You can find that release here: https://github.com/operator-framework/operator-sdk/releases/tag/v0.19.2
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
 

Hi @arivatibm,

will an operator created with version 1.0.0 of operator SDK work on an OCP 4.3 cluster?

Yes, it will. You can use the 1.0.0 upstream sdk release to build projects for OCP.

Alternatively, you could use the v0.19 docs https://v0-19-x.sdk.operatorframework.io/

Alternatively, you could use the v0.19 docs https://v0-19-x.sdk.operatorframework.io/

Yes - this is what I ended up doing

Hi @arivatibm,

Have you been updating the docker file to use the downstream image? I mean the image that is in redhat catalogue. If not, then I'd truly recommend you NOT create new projects using 0.19 since its layout differ a lot from 1.0.0 and you will need to migrate them soon. The 1.0 should work with OCP. Also, in the 0.19 you will be unable to create new GO projects with the legacy layout already.

c/c @asmacdo @jmrodri

Hi @arivatibm,

Have you been updating the docker file to use the downstream image? I mean the image that is in redhat catalogue. If not, then I'd truly recommend you NOT create new projects using 0.19 since its layout differ a lot from 1.0.0 and you will need to migrate them soon. The 1.0 should work with OCP. Also, in the 0.19 you will be unable to create new GO projects with the legacy layout already.

c/c @asmacdo @jmrodri

I followed the instructions and tried it twice and had the same issue
might get back to it after version 1.0.1 is released

This is due to version incompatibility , you can verify this using " operator-sdk --help " , V1.0.X do not support " operator-sdk new " , on the contrary V0.17.X do . The official traps are the most deadly . sad sad sad ! ! !

HI @arivatibm,

Could you please follow up the docs in https://sdk.operatorframework.io/docs/building-operators/golang to work with the latest versions?

We have developed the operator for a Demo so not clear if we will upgrade

Closing as this is a documentation problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lsalazar1 picture lsalazar1  Â·  4Comments

nrvnrvn picture nrvnrvn  Â·  5Comments

hasbro17 picture hasbro17  Â·  3Comments

bobdonat picture bobdonat  Â·  3Comments

flickerfly picture flickerfly  Â·  5Comments