Openshift: Difference between revisions

From Halfface
Jump to navigation Jump to search
Line 14: Line 14:
  oc logs -f router-default-6b76b87c6-4lc4b logs > /tmp/tmp
  oc logs -f router-default-6b76b87c6-4lc4b logs > /tmp/tmp
=get config from pod in yaml format=
=get config from pod in yaml format=
oc get pods router-default-545ffb97db-kgsdb -o yaml
oc get pods router-default-545ffb97db-kgsdb -o yaml
=get deployments=
oc get deployment

Revision as of 15:04, 15 April 2021

List projects

oc projects

select project

oc project $project

list pods

oc get pods

connect to pod

oc get pods

describe pods

oc describe pods

To get (almost) all object with a specific label from the current project, execute:

oc get all -l '<label_name>=<label_value>'

logs

oc logs -f router-default-6b76b87c6-4lc4b logs > /tmp/tmp

get config from pod in yaml format

oc get pods router-default-545ffb97db-kgsdb -o yaml

get deployments

oc get deployment