Re: How to retrieve session token via rest api?

2018-08-02 Thread Aleksandar Kostadinov
Hi, I have a blog about it [1]. HTH [1] http://rboci.blogspot.com/2015/07/openshift-v3-rest-api-usage.html Yu Wei wrote on 08/01/18 12:24: Hi guys, I could get session token via cli "oc whoami -t". Could I get the same information via rest api? I tried with api below, however, it returned

Re: How to retrieve session token via rest api?

2018-08-02 Thread Graham Dumpleton
You can see what commands do by adding '--loglevel 9' option. oc whoami -t --loglevel 9 What you will find in this case though is that for that token in particular it doesn't actually make any API calls, as all it is doing is getting it from the ~/.kube/config file. What do you want to

Re: User "admin" cannot get securitycontextconstraints at the cluster scope

2018-08-02 Thread Graham Dumpleton
For Minishift I believe you can run: oc adm policy add-scc-to-user anyuid -z default -n tomcat8 --as system:admin So use user impersonation to run as system:admin. > On 2 Aug 2018, at 6:46 pm, Clayton Coleman wrote: > > User “admin” (that’s the user name) must be given real admin >

Re: how to query openshift api-version ?

2018-08-02 Thread Maciej Szulik
Already oc 3.10 contains the api-versions and api-resources subcommands. On Thu, Aug 2, 2018 at 6:31 AM Nakayama Kenjiro wrote: > "oc api-versions" is available on the latest binary. (For example, I > tested with v3.11.0-alpha.0+bb11f51-481 as below). > Having said that, both kubectl and oc

Re: User "admin" cannot get securitycontextconstraints at the cluster scope

2018-08-02 Thread Maciej Szulik
On Thu, Aug 2, 2018 at 3:16 AM Traiano Welcome wrote: > Hi > > I was working through the O'Reilly book "OpenShift for developers" but the > example on page 75, where tomcat8 is run fails: > > - The container remains in crashloop backoff > - The logs show the container is having permission