Learning resources

OpenShit support



Most common operations

Most recurring operations run using the OpenShift CLI tool: oc

Login to OpenShift using the CLI

oc login https://openshift:4443 --token=token_id

Choose project

oc project project_name

List pods

oc get pods

Search a given pod from the list of running Pods

oc get pods |grep pod_name

Delete a pod

oc delete pod pod_name -n project_name --grace-period=0

Monitoring pod restart

watch -n 1 'oc get pods |grep pod_name'

List existing deployments in this project

oc get dc

List details of current and past deployments of a given microservice

oc rollout history dc/pod_name

oc rollout history dc/pod_name --revision=44

Scale down pods

oc scale dc pod_name --replicas=0

Scale up pods

oc scale dc pod_name --replicas=4

Get pod's log

oc logs pod_name

Get pod's metrics

oc describe PodMetrics pod_name

Back to top