1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

Merge pull request #14147 from mburke5678/fix-oc-commands

Fixing the oc commands to have $
This commit is contained in:
Michael Burke
2019-03-15 17:34:27 -04:00
committed by GitHub
17 changed files with 37 additions and 38 deletions

View File

@@ -17,14 +17,14 @@ Perform one of the following steps:
.. View the Machine Config Pool:
+
----
# oc describe machineconfigpool <name>
$ oc describe machineconfigpool <name>
----
+
For example:
+
[source,yaml]
----
# oc describe machineconfigpool worker
$ oc describe machineconfigpool worker
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool

View File

@@ -21,14 +21,14 @@ Perform one of the following steps:
.. View the Machine Config Pool:
+
----
# oc describe machineconfigpool <name>
$ oc describe machineconfigpool <name>
----
+
For example:
+
[source,yaml]
----
# oc describe machineconfigpool worker
$ oc describe machineconfigpool worker
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool

View File

@@ -54,7 +54,7 @@ $ oc create -f <file-name>.yaml
. Access the pod using a remote shell:
+
----
# oc rsh test
$ oc rsh test
----
. Check that the requested values were applied:

View File

@@ -15,14 +15,14 @@ As an administrator, you can configure how {product-title} performs garbage coll
.. View the Machine Config Pool:
+
----
# oc describe machineconfigpool <name>
$ oc describe machineconfigpool <name>
----
+
For example:
+
[source,yaml]
----
# oc describe machineconfigpool worker
$ oc describe machineconfigpool worker
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool

View File

@@ -17,7 +17,7 @@ Perform one of the following steps:
For example:
+
----
# oc edit machineconfigpool worker
$ oc edit machineconfigpool worker
metadata:
creationTimestamp: 2019-01-31T07:10:04Z
@@ -60,7 +60,7 @@ $ oc create -f <file-name>
For example:
+
----
# oc create -f master-kube-config.yaml
$ oc create -f master-kube-config.yaml
----
Most https://github.com/kubernetes/kubernetes/blob/release-1.11/pkg/kubelet/apis/kubeletconfig/v1beta1/types.go#L45[KubeletConfig Options] may be set by the user. The following options are not allowed to be overwritten:

View File

@@ -22,13 +22,13 @@ Perform one of the following steps:
.. View the Machine Config Pool:
+
----
# oc describe machineconfigpool <name>
$ oc describe machineconfigpool <name>
----
+
For example:
+
----
# oc describe machineconfigpool worker
$ oc describe machineconfigpool worker
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
@@ -43,7 +43,7 @@ metadata:
.. If the label is not present, add a key/value pair:
+
----
# oc label machineconfigpool worker custom-kubelet=small-pods
$ oc label machineconfigpool worker custom-kubelet=small-pods
----
.Procedure
@@ -83,7 +83,7 @@ cores or more, by default, `podsPerCore` will be the limiting factor.
. List the Machine Config Pool CRDs to see if the change is applied. The `UPDATING` column reports `True` if the change is picked up by the Machine Config Controller:
+
----
# oc get machineconfigpools
$ oc get machineconfigpools
NAME CONFIG UPDATED UPDATING DEGRADED
master master-9cc2c72f205e103bb534 False False False
worker worker-8cecd1236b33ee3f8a5e False True False
@@ -92,7 +92,7 @@ worker worker-8cecd1236b33ee3f8a5e False True False
Once the change is complete, the `UPDATED` column reports `True`.
+
----
# oc get machineconfigpools
$ oc get machineconfigpools
NAME CONFIG UPDATED UPDATING DEGRADED
master master-9cc2c72f205e103bb534 False True False
worker worker-8cecd1236b33ee3f8a5e True False False

View File

@@ -41,7 +41,7 @@ The following examples show output from the Node Problem Detector watching for k
uses `oc get node` to watch a specific node filtering for a `KernelDeadlock` entry in a log.
----
# oc get node <node> -o yaml | grep -B5 KernelDeadlock
$ oc get node <node> -o yaml | grep -B5 KernelDeadlock
----
.Sample Node Problem Detector output with no issues
@@ -57,7 +57,7 @@ The following command uses `oc get event` against the *default* project watching
events listed in the `kernel-monitor.json` section of the Node Problem Detector configuration map.
----
# oc get event -n default --field-selector=source=kernel-monitor --watch
$ oc get event -n default --field-selector=source=kernel-monitor --watch
----
.Sample output showing events on nodes

View File

@@ -34,7 +34,7 @@ $ oc edit problem-node-detector <node>
For example:
+
----
oc edit problem-node-detector problem-node-detector
$ oc edit problem-node-detector problem-node-detector
apiVersion: node-problem-detector.operator.k8s.io/v1alpha1
kind: NodeProblemDetector

View File

@@ -167,9 +167,9 @@ roleRef:
----
oc create -f deploy/rbac.yaml
oc create -f deploy/operator.yaml
oc create -f deploy/cr.yaml
$ oc create -f deploy/rbac.yaml
$ oc create -f deploy/operator.yaml
$ oc create -f deploy/cr.yaml
. Create a Node Problem Detector custom resource (CR):

View File

@@ -18,7 +18,7 @@ To verify that the Node Problem Detector is active:
. Run the following command to get the name of the Problem Node Detector pod:
+
----
# oc get pods -n openshift-node-problem-detector
$ oc get pods -n openshift-node-problem-detector
NAME READY STATUS RESTARTS AGE
node-problem-detector-8z8r8 1/1 Running 0 1h
@@ -29,24 +29,24 @@ node-problem-detector-nggjv 1/1 Running 0 1h
. Run the following command to view log information on the Problem Node Detector pod:
+
----
# oc logs -n openshift-node-problem-detector <pod_name>
$ oc logs -n openshift-node-problem-detector <pod_name>
----
+
The output should be similar to the following:
+
----
# oc logs -n openshift-node-problem-detector node-problem-detector-c6kng
$ oc logs -n openshift-node-problem-detector node-problem-detector-c6kng
I0416 23:22:00.641354 1 log_monitor.go:63] Finish parsing log monitor config file: {WatcherConfig:{Plugin:journald PluginConfig:map[source:kernel] LogPath:/host/log/journal Lookback:5m} BufferSize:10 Source:kernel-monitor DefaultConditions:[{Type:KernelDeadlock Status:false Transition:0001-01-01 00:00:00 +0000 UTC Reason:KernelHasNoDeadlock Message:kernel has no deadlock}]
----
. Test the Node Problem Detector by simulating an event on the node:
+
----
# echo "kernel: divide error: 0000 [#0] SMP." >> /dev/kmsg
$ echo "kernel: divide error: 0000 [#0] SMP." >> /dev/kmsg
----
. Test the Node Problem Detector by simulating a condition on the node:
+
----
# echo "kernel: task blocked for more than 300 seconds." >> /dev/kmsg
$ echo "kernel: task blocked for more than 300 seconds." >> /dev/kmsg
----

View File

@@ -70,14 +70,14 @@ Perform one of the following steps:
.. View the Machine Config Pool:
+
----
# oc describe machineconfigpool <name>
$ oc describe machineconfigpool <name>
----
+
For example:
+
[source,yaml]
----
# oc describe machineconfigpool worker
$ oc describe machineconfigpool worker
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool

View File

@@ -14,7 +14,7 @@ nodes on which the daemonset should deploy replicas.
in your namespace, by setting the namespace annotation `openshift.io/node-selector` to an empty string:
+
----
# oc patch namespace myproject -p \
$ oc patch namespace myproject -p \
'{"metadata": {"annotations": {"openshift.io/node-selector": ""}}}'
----

View File

@@ -17,14 +17,14 @@ Perform one of the following steps:
.. View the Machine Config Pool:
+
----
# oc describe machineconfigpool <name>
$ oc describe machineconfigpool <name>
----
+
For example:
+
[source,yaml]
----
# oc describe machineconfigpool worker
$ oc describe machineconfigpool worker
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool

View File

@@ -26,8 +26,7 @@ $ oc get pods
For example:
+
----
$ oc get pods
oc get pods -n openshift-console
$ oc get pods -n openshift-console
NAME READY STATUS RESTARTS AGE
console-698d866b78-bnshf 1/1 Running 2 165m
console-698d866b78-m87pm 1/1 Running 2 165m

View File

@@ -38,19 +38,19 @@ rules:
. Create the service account that runs the job:
+
----
# oc create sa <file-name>.yaml -n openshift-operators
$ oc create sa <file-name>.yaml -n openshift-operators
----
+
For example:
+
----
# oc create sa descheduler-sa.yaml -n openshift-operators
$ oc create sa descheduler-sa.yaml -n openshift-operators
----
. Bind the cluster role to the schedluer service account:
+
----
# oc create clusterrolebinding descheduler-cluster-role-binding \
$ oc create clusterrolebinding descheduler-cluster-role-binding \
--clusterrole=descheduler-cluster-role \
--serviceaccount=openshift-operators:descheduler-sa
----

View File

@@ -33,7 +33,7 @@ $ oc edit Descheduler <cr-name> -n openshift-operators
For example:
+
----
oc edit Descheduler descheduler -n openshift-operators
$ oc edit Descheduler descheduler -n openshift-operators
----
. Change the parameters and values as needed:

View File

@@ -26,11 +26,11 @@ You should have created the following for the descheduler:
Run the following command to run the descheduler as a job in a pod:
----
# oc create -f <file-name>.yaml
$ oc create -f <file-name>.yaml
----
For example:
----
# oc create -f descheduler-job.yaml
$ oc create -f descheduler-job.yaml
----