https://github.com/openshift/origin/blob/master/examples/sample-app/container-setup.md
all-in-one的openshift 容器启动后,进入容器,创建管理员
htpasswd -c openshift.local.config/master/htpasswd admin
授权时候报错
openshift-dock: [root@lanny sample-app]$ oadm policy add-cluster-role-to-user cluster-admin admin
Error from server (Forbidden): User "system:anonymous" cannot get clusterpolicybindings at the cluster scope
解决:
先登录后授权,否则看不到任何ns
openshift-dock: [root@lanny sample-app]$ oc login -u system:admin -n default
Logged into "https://192.168.14.138:8443" as "system:admin" using existing credentials.
You have access to the following projects and can switch between them with 'oc project <projectname>':
* default
demo-project
kube-system
openshift
openshift-infra
Using project "default".
#授权成功
openshift-dock: [root@lanny sample-app]$ oc adm policy add-cluster-role-to-user cluster-admin admin
cluster role "cluster-admin" added: "admin"
232




被折叠的 条评论
为什么被折叠?



