[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: errors accessing egressnetworkpolicies.network.openshift.io when attempting to export project



For the basic Python application you wouldn't need to export most of those and for some doing so would cause problems when you try to load them again.

For a basic application with no secrets, configmaps or persistent volumes, all you need is:

    oc export is,bc,dc,svc,route -o yaml


Do not include pods, replicationcontrollers or endpoints.

You also want to be selective about what you export by using a label selector.

    oc export is,bc,dc,svc,route --selector app=yourappname -o yaml

That way you get just what is necessary for the application.

Before they can be reloaded in a fresh project or OpenShift instance, you would usually need to massage the result, especially fixing up image references and reverting them to image stream references.

Overall you are better off to export as a template and edit the result to create a template you can then deploy multiple times, where the application name is parameterised.

Graham

On 2 Jun 2018, at 2:01 am, Brian Keyes <bkeyes vizuri com> wrote:

I am attempting to follow these instructions 


I want to backup THE sample python app and I created a script like this ( from the documentation)




$ for object in rolebindings serviceaccounts secrets imagestreamtags podpreset cms egressnetworkpolicies rolebindingrestrictions limitranges resourcequotas pvcs templates cronjobs statefulsets hpas deployments replicasets poddisruptionbudget endpoints
do
  oc export $object -o yaml > $object.yaml
done

--
but when I run this I get some access denied errors like this , is this saying that the objects I am attempting to back up do not exist?


$ ./exportotherprojects.sh
error: no resources found - nothing to export
the server doesn't have a resource type "cms"
Error from server (Forbidden): User "admin" cannot list egressnetworkpolicies.network.openshift.io in the namespace "sample-py": User "admin" cannot list egressnetworkpolicies.network.openshift.io in project "sample-py" (get egressnetworkpolicies.network.openshift.io)
error: no resources found - nothing to export
error: no resources found - nothing to export
error: no resources found - nothing to export
the server doesn't have a resource type "pvcs"
error: no resources found - nothing to export
error: no resources found - nothing to export
error: no resources found - nothing to export
the server doesn't have a resource type "hpas"
error: no resources found - nothing to export
error: no resources found - nothing to export
Error from server (Forbidden): User "admin" cannot list poddisruptionbudgets.policy in the namespace "sample-py": User "admin" cannot list poddisruptionbudgets.policy in project "sample-py" (get poddisruptionbudgets.policy)


thanks 

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]