You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I backup a resource in a namespace using $ oc get --export and then apply it to a different namespace, I get the following error:
error: the namespace from the provided object "dev" does not match the namespace "prod". You must pass '--namespace=dev' to perform this operation.
$ oc get --export exported the dev namespace which means I can only apply it in that namespace. I can't apply it elsewhere. This happens because $ oc get --export exports additional metadata about kubernetes resources that the deprecated $ oc export doesn't export.
I can remove namespaces from the resource using jq or yq, but is there a better solution specifically for OpenShift that doesn't involve editing the resource?
Version
v3.11.146
The text was updated successfully, but these errors were encountered:
ammarzia
changed the title
Can't export resources and use them in different namespaces using --get export.
Can't export resources and use them in different namespaces using oc get --export.
Jan 7, 2020
ammarzia
changed the title
Can't export resources and use them in different namespaces using oc get --export.
Can't export resources and use them in different namespaces using get --export.
Jan 7, 2020
This functionality is removed by now. I'm going to close this.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
If I backup a resource in a namespace using
$ oc get --export
and then apply it to a different namespace, I get the following error:error: the namespace from the provided object "dev" does not match the namespace "prod". You must pass '--namespace=dev' to perform this operation.
$ oc get --export
exported thedev
namespace which means I can only apply it in that namespace. I can't apply it elsewhere. This happens because$ oc get --export
exports additional metadata about kubernetes resources that the deprecated$ oc export
doesn't export.It looks like this behavior is intentional:
kubernetes/kubernetes#73787 (comment)
kubernetes/kubernetes#57898
#10091 (comment)
I can remove namespaces from the resource using jq or yq, but is there a better solution specifically for OpenShift that doesn't involve editing the resource?
Version
v3.11.146
The text was updated successfully, but these errors were encountered: