Getting Started

Management Tools

Project groups and separates applications. In project, you manage your applications.

Examples

  • oc login to log in. It wil prompt you to enter the OpenShift host.
  • oc login -u username -p password to log in with specified username and password

Download OpenShift Command Line Tool (oc) from the Command Line Tools page on the web console.

Projects

 Projects help teams to separate from each other.

Users

  • Regular account e.g. developers
  • System account are created by default with system: prefix.
  • Service account can also be created  with system:serviceaccount: prefix

Built-in system accounts cannot log in via WebUI. You need to create a new account and assign administrator role instead.

Authentication will be done with OAuth mechanism. By default, the policy is Allow All i.e. anyone can log in and create a new account. This can be setup in the master configuration file at /etc/openshift/master/master-config.yaml.

Demo

$ oc login
Authentication required for https://minishift (openshift)
Username: admin
Password:
Login successful.

$ oc get projects
NAME                    DISPLAY NAME   STATUS
default                                Active
kube-public                            Active
kube-system                            Active
myproject               My Project     Active
openshift                              Active
openshift-infra                        Active
openshift-node                         Active
openshift-web-console                  Active

$ oc get users
NAME        UID                                    FULL NAME   IDENTITIES
admin       182db051-76b7-11e8-918d-525400eb9659   admin       anypassword:admin
developer   b47e7e8c-76ac-11e8-918d-525400eb9659               anypassword:developer

$ oc create user admin2
user "admin2" created

$ oc adm policy add-cluster-role-to-user cluster-admin admin2
cluster role "cluster-admin" added: "admin2"

$ oc logout
Logged "admin" out on "https://minishift"

$ oc login
Authentication required for https://minishift (openshift)
Username: admin2
Password:
Login successful.

$ oc get projects
NAME                    DISPLAY NAME   STATUS
default                                Active
kube-public                            Active
kube-system                            Active
myproject               My Project     Active
openshift                              Active
openshift-infra                        Active
openshift-node                         Active
openshift-web-console                  Active
  • anypassword is an identity provider in minishift

No Comments

Back to top