oc login [url of console openshift]
Authentication required for https://console.example.id:443 (openshift)
Username: admin
Password:
Get List of Node
oc get node
NAME STATUS AGE VERSION
node1.example.id Ready 1y v1.7.6+a08f5eeb62
node2.example.id Ready 1y v1.7.6+a08f5eeb62
Describe of Node
oc describe node node1.example.id
Get List of Project
oc get project
Describe of Project
oc describe project [name project]
Switch context to some project
oc project [name project]
Get list of DC
oc get dc
oc get dc -o wide
oc get dc -n [name project]
Describe of some DC
oc describe dc [name dc]
Get list of Pods
oc get pod
oc get pod -o wide
oc get pod -n [name project]
Describe of some Pod
oc describe pod [name pod]
Get list of Service
oc get svc
oc get svc -o wide
oc get svc -n [name project]
Describe of some Service
oc describe svc [name service]
Get Stats Top Node
oc adm top node
oc adm top node --selector [selector=value]
Mark Node Unschedulable
oc adm cordon [name node]
Mark Node schedulable
oc adm uncordon [name node]
Evacuates all pod and Drain node in preparation for maintenance
oc adm drain [name node] --force --delete-local-data --grace-period=0
Add clusterrole to user
oc adm policy add-cluster-role-to-user [role] [user name]