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

Why can't we delete a project with oc delete project



Hi,

When I use these openshift oc client commands in a bash shell script, then I get this error

## Log on with the dev user, create the vertx project
Error from server: project "vertx-demo" already exists
## Add policies
Error from server: User "vertx-dev" cannot get policybindings in project "vertx-demo"
Error from server: User "vertx-dev" cannot get policybindings in project "vertx-demo"

Why can't we delete an existing project ? Is there a workaround ?

#!/usr/bin/env bash
oc logout
oc login -u admin -p admin
oc delete project vertx-demo
oc login -u vertx-dev -p devel
echo "## Log on with the dev user, create the vertx project"
oc new-project vertx-demo
echo "## Add policies"
oc policy add-role-to-user view vertx-dev -n vertx-demo
oc policy add-role-to-group view system:serviceaccounts -n vertx-demo

Regards,

CharlesĀ 

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