rico
rico

Reputation: 1935

Permissions problems with openshift client on minishift

I have installed minishift with cask and openshift client with homebrew.

However, as developer user, I am not able to create a project from openshift cli, trigger a build, etc. I always have permissions errors :

Error from server (Forbidden): User "developer" cannot list all project.openshift.io.projectrequests in the cluster
Error from server (Forbidden): User "developer" cannot list authorization.openshift.io.rolebindings in project "my_awesome_project"
Error from server (Forbidden): User "developer" cannot create build.openshift.io.buildconfigs/instantiatebinary in project "my_awesome_project"

However, I am able to create projects from the UI. How can I grant developer user permissions from the command line ?

I am using MacOS High Sierra:

➜ minishift version
minishift v1.15.1+a5c47dd

➜ oc version
oc v3.9.0+191fece
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth

Server https://192.168.99.100:8443
openshift v1.5.0-rc.0+49a4a7a
kubernetes v1.5.2+43a9be4

Upvotes: 2

Views: 1174

Answers (2)

jorgemoralespou
jorgemoralespou

Reputation: 121

You should downgrade your client or upgrade your minishift version to match if possible, as they are not 100% API compatible.

You can use the minishift oc binary in an easy way, so you still preserve you're other client if needed (maybe you need to run multiple versions). To do that do:

localhost# eval $(minishift oc-env)

This will execute:

export PATH="/Users/me/.minishift/cache/oc/v3.7.2/darwin:$PATH"

In this way, you'll always be using the same client version as your minishift instance.

Upvotes: 5

monis
monis

Reputation: 494

The version of oc that you are using (3.9) is not compatible with the server (1.5 / 3.5). Use a newer version of Openshift or downgrade oc to 3.6.

Upvotes: 3

Related Questions