Bug 1671528
Summary: | error: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1beta1" in scheme "k8s.io/kubernetes/pkg/kubectl/scheme/scheme.go:28" | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Erik M Jacobs <ejacobs> | |
Component: | Templates | Assignee: | Gabe Montero <gmontero> | |
Status: | CLOSED ERRATA | QA Contact: | XiuJuan Wang <xiuwang> | |
Severity: | low | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 4.1.0 | CC: | adam.kaplan, aos-bugs, chezhang, chuo, gmontero, jiazha, jokerman, jwendell, mfojtik, mmccomas, pweil, wzheng, zitang | |
Target Milestone: | --- | |||
Target Release: | 4.1.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: |
Cause: 'oc new-app' originated before the rise of CRDs, does not support them, and the error message around not being able to create them is confusing
Consequence: users were left unclear on how to create their CRDs
Fix: better recognize the error when trying to create CRDs and clearly propose to the user which command should be used to create them
Result: a clearer path exists for the user
|
Story Points: | --- | |
Clone Of: | ||||
: | 1702693 (view as bug list) | Environment: | ||
Last Closed: | 2019-06-04 10:42:30 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1702693 |
Description
Erik M Jacobs
2019-01-31 20:04:22 UTC
Devexp team should re-write new-app, I've created https://jira.coreos.com/browse/DEVEXP-285 to track it. *** Bug 1662865 has been marked as a duplicate of this bug. *** This is still not fixed with v4.0.22 @Erik did you update your oc client? oc new-app -n istio-operator -f https://raw.githubusercontent.com/Maistra/openshift-ansible/maistra-0.7/istio/istio_community_operator_template.yaml -p OPENSHIFT_ISTIO_MASTER_PUBLIC_URL=https://api.beta-190318-1.ocp4testing.openshiftdemos.com:6443 error: no kind \"CustomResourceDefinition\" is registered for version \"apiextensions.k8s.io/v1beta1\" in scheme \"k8s.io/kubernetes/pkg/kubectl/scheme/scheme.go:28\ oc version Client Version: version.Info{Major:"4", Minor:"0+", GitVersion:"v4.0.22", GitCommit:"d14915559e", GitTreeState:"", BuildDate:"2019-03-14T21:55:38Z", GoVersion:"", Compiler:"", Platform:""} Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.4+0f8e04e", GitCommit:"0f8e04e", GitTreeState:"clean", BuildDate:"2019-03-04T15:33:19Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"} There is no newer build available on the mirror site. `oc process` does support templates which create CRDs and custom resources. Work-around is to pipe `oc process` output to `oc create` [1]. oc new-app should capture this error and inform developers of this work-around. [1] https://docs.openshift.com/container-platform/3.11/dev_guide/templates.html#generating-a-list-of-objects Moving this to low-severity - this should not block 4.1 GA release. PR https://github.com/openshift/origin/pull/22518 is up against master branch Assuming we'll cherry pick back to 3.11.x @Gabe If we're going to backport to 3.11, I'd clone this BZ so errata can be generated through the normal process. Actually @Adam I'm instead going to employ - have QA verify with a 4.x build that contains the merged commit from https://github.com/openshift/origin/pull/22518 - when they mark it verified, move the bug back to POST and cherrypick into 3.11 - when that PR merges, we'll move through the MODIFIED/doc for Errata/verify on 3.11 cycle. A little defect need be improved. When 'oc new-app -f' with file, the promption is "oc process -f file | oc create -f -". But if without -f in 'oc new-app', the promption is 'oc process | oc create', it's not clear in next step for customer. $oc new-app -f ~/workdir/xiuwang/cmbuild/template-with-crd.yaml error: The template contained an object type unknown to `oc new-app`. Use `oc process -f /home/wxj/workdir/xiuwang/cmbuild/template-with-crd.yaml | oc create -f -` instead. Error details: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1beta1" in scheme "k8s.io/kubernetes/pkg/kubectl/scheme/scheme.go:28" $oc new-app https://raw.githubusercontent.com/Maistra/openshift-ansible/maistra-0.7/istio/istio_community_operator_template.yaml error: The template contained an object type unknown to `oc new-app`. Use `oc process | oc create` instead. Error details: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1beta1" in scheme "k8s.io/kubernetes/pkg/kubectl/scheme/scheme.go:28" $oc version Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0", GitCommit:"85db872d8", GitTreeState:"", BuildDate:"2019-04-17T20:07:02Z", GoVersion:"", Compiler:"", Platform:""} Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+53af542", GitCommit:"53af542", GitTreeState:"clean", BuildDate:"2019-04-16T06:50:32Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"} PR https://github.com/openshift/origin/pull/22604 is up to address @XiuJuan's suggestion plus something @Adam realized FYI @XiuJuan during PR review it has been decided to go with a generic format of: oc process -f <template> | oc create -f - we won't try to place the actual supplied parameters. OK PR https://github.com/openshift/origin/pull/22604 has merged. See #Comment 19 on where we landed with the message. If QE verifies in 4.x I'll move on to crafting the 3.11 change with this bug. The fix works with oc client getting from payload 4.1.0-0.ci-2019-04-24-043324 $ oc new-app -f template-with-crd.yaml error: The template contained an object type unknown to `oc new-app`. Use `oc process -f <template> | oc create -f -` instead. Error details: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1beta1" in scheme "k8s.io/kubernetes/pkg/kubectl/scheme/scheme.go:28" $ oc new-app https://raw.githubusercontent.com/Maistra/openshift-ansible/maistra-0.7/istio/istio_community_operator_template.yaml error: The template contained an object type unknown to `oc new-app`. Use `oc process -f <template> | oc create -f -` instead. Error details: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1beta1" in scheme "k8s.io/kubernetes/pkg/kubectl/scheme/scheme.go:28" $ oc version --short Client Version: v4.0.0-alpha.0+2cbb022-2151-dirty Server Version: v1.13.4+c3edcc6 great thanks @XiuJuan and eschewing the re-purpose this bug for 3.11 with Adam's clone the bug Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758 |