Openshift Cheatsheet


#Current user
$oc whoami

#login with any user
$oc login https://192.168.99.100:8443 -u developer -p developer

#view your configuration
$oc config view

#View pods
$oc get pods

#Show pods with labels
$oc get pods --show-labels

#Show pods with detailed view
$oc get pods -o wide

#get openshift console address
$oc get -n openshift-console route console

#Exec single command in pod
$oc exec $POD $COMMAD

#Get nodes list
$oc get nodes

#check status of current project
$oc status

#get all resource
$oc get all

#Switch project
$oc project <project_name>

#Tag an image
$oc tag <current_image> <image_stream>




DevOpsMap

Learn today for better tomorrow

0 Comments