Deployment of an application failing while using serviceaccount

Solution Verified - Updated -


  • When using a serviceaccount to provision a new application, following error occured:
# oc new-app . --name=$XX_PROJECT_NAME --strategy=docker

warning: Cannot find git. Ensure that it is installed and in your path. Git is required to work with git repositories.
--> Found Docker image 2671f7a (5 weeks old) from Docker Hub for "centos:centos7"
    * An image stream will be created as "centos:centos7" that will track the source image
    * A Docker build using binary input will be created
      * The resulting image will be pushed to image stream "NAMESPACE:latest"
      * A binary build was created, use 'start-build --from-dir' to trigger a new build
    * This image will be deployed in deployment config "NAMESPACE"
    * Port 80 will be load balanced by service "NAMESPACE"
      * Other containers can access this service through the hostname "NAMESPACE"
    * WARNING: Image "centos:centos7" runs as the 'root' user which may not be permitted by your cluster administrator
--> Creating resources ...
    error: User "system:serviceaccount:NAMESPACE:xyz" cannot create imagestreams in project "NAMESPACE"
    error: User "system:serviceaccount:NAMESPACE:xyz" cannot create imagestreams in project "NAMESPACE"
    error: User "system:serviceaccount:NAMESPACE:xyz" cannot create buildconfigs in project "NAMESPACE"
    error: User "system:serviceaccount:NAMESPACE:xyz" cannot create deploymentconfigs in project "NAMESPACE"
--> Failed
    error: User "system:serviceaccount:NAMESPACE:xyz" cannot create services in project "NAMESPACE"


  • OpenShift Container Platform
    • 3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content