mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * microshift-cli-using-oc/microshift-oc-apis-errors.adoc
|
|
|
|
:_mod-docs-content-type: CONCEPT
|
|
[id="cli-using-cli_{context}"]
|
|
= Using oc with a {microshift-short} node
|
|
|
|
[role="_abstract"]
|
|
You can complete common tasks in {microshift-short} by using the `oc` CLI.
|
|
|
|
[NOTE]
|
|
====
|
|
When you run `oc` inside a pod and do not specify a namespace, the namespace of the pod is used by default.
|
|
====
|
|
|
|
* To view the pods for the current project, run the `oc get pods` command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get pods -o wide
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE
|
|
cakephp-ex-1-build 0/1 Completed 0 5m45s 10.131.0.10 ip-10-0-141-74.ec2.internal <none>
|
|
cakephp-ex-1-deploy 0/1 Completed 0 3m44s 10.129.2.9 ip-10-0-147-65.ec2.internal <none>
|
|
cakephp-ex-1-ktz97 1/1 Running 0 3m33s 10.128.2.11 ip-10-0-168-105.ec2.internal <none>
|
|
----
|
|
|
|
* To view logs for a particular pod, run the `oc logs` command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc logs cakephp-ex-1-deploy
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
--> Scaling cakephp-ex-1 to 1
|
|
--> Success
|
|
----
|
|
|
|
* To view the list of supported API resources on the server, run the `oc api-resources` command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc api-resources
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME SHORTNAMES APIGROUP NAMESPACED KIND
|
|
bindings true Binding
|
|
componentstatuses cs false ComponentStatus
|
|
configmaps cm true ConfigMap
|
|
...
|
|
----
|