Had this error when im using Jenkins and integrate it to Openshift Container Platform
--> Creating resources with label build=hello-world-dot-net-core ...
error: imagestreams.image.openshift.io is forbidden: User "system:serviceaccount:cicd:default" cannot create resource "imagestreams" in API group "image.openshift.io" in the namespace "cicd"
error: buildconfigs.build.openshift.io is forbidden: User "system:serviceaccount:cicd:default" cannot create resource "buildconfigs" in API group "build.openshift.io" in the namespace "cicd"
--> Failed
How to solve this issue is actually quite simple, running this below command can solve it directly.
$ oc policy add-role-to-user admin system:serviceaccount:cicd:default -n cicd