Skip to content

Commit fd0fc44

Browse files
committed
Autogenerate updated CLI docs for 4.9
1 parent b27716b commit fd0fc44

File tree

2 files changed

+247
-223
lines changed

2 files changed

+247
-223
lines changed

modules/oc-adm-by-example-content.adoc

Lines changed: 60 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,30 @@ Mirror an operator-registry catalog
5454

5555

5656

57+
== oc adm certificate approve
58+
Approve a certificate signing request
59+
60+
.Example usage
61+
[source,bash,options="nowrap"]
62+
----
63+
# Approve CSR 'csr-sqgzp'
64+
kubectl certificate approve csr-sqgzp
65+
----
66+
67+
68+
69+
== oc adm certificate deny
70+
Deny a certificate signing request
71+
72+
.Example usage
73+
[source,bash,options="nowrap"]
74+
----
75+
# Deny CSR 'csr-sqgzp'
76+
kubectl certificate deny csr-sqgzp
77+
----
78+
79+
80+
5781
== oc adm completion
5882
Output shell completion code for the specified shell (bash or zsh)
5983

@@ -65,13 +89,13 @@ Output shell completion code for the specified shell (bash or zsh)
6589
brew install bash-completion
6690
## or, if running Bash 4.1+
6791
brew install bash-completion@2
68-
## If oc is installed via homebrew, this should start working immediately.
92+
## If oc is installed via homebrew, this should start working immediately
6993
## If you've installed via other means, you may need add the completion to your completion directory
7094
oc completion bash > $(brew --prefix)/etc/bash_completion.d/oc
7195
7296
7397
# Installing bash completion on Linux
74-
## If bash-completion is not installed on Linux, please install the 'bash-completion' package
98+
## If bash-completion is not installed on Linux, install the 'bash-completion' package
7599
## via your distribution's package manager.
76100
## Load the oc completion code for bash into the current shell
77101
source <(oc completion bash)
@@ -92,7 +116,7 @@ Output shell completion code for the specified shell (bash or zsh)
92116

93117

94118
== oc adm config current-context
95-
Displays the current-context
119+
Display the current-context
96120

97121
.Example usage
98122
[source,bash,options="nowrap"]
@@ -145,7 +169,7 @@ Display clusters defined in the kubeconfig
145169
.Example usage
146170
[source,bash,options="nowrap"]
147171
----
148-
# List the clusters oc knows about
172+
# List the clusters that oc knows about
149173
oc config get-clusters
150174
----
151175

@@ -160,7 +184,7 @@ Describe one or many contexts
160184
# List all the contexts in your kubeconfig file
161185
oc config get-contexts
162186
163-
# Describe one context in your kubeconfig file.
187+
# Describe one context in your kubeconfig file
164188
oc config get-contexts my-context
165189
----
166190

@@ -172,14 +196,14 @@ Display users defined in the kubeconfig
172196
.Example usage
173197
[source,bash,options="nowrap"]
174198
----
175-
# List the users oc knows about
199+
# List the users that oc knows about
176200
oc config get-users
177201
----
178202

179203

180204

181205
== oc adm config rename-context
182-
Renames a context from the kubeconfig file.
206+
Rename a context from the kubeconfig file
183207

184208
.Example usage
185209
[source,bash,options="nowrap"]
@@ -191,33 +215,33 @@ Renames a context from the kubeconfig file.
191215

192216

193217
== oc adm config set
194-
Sets an individual value in a kubeconfig file
218+
Set an individual value in a kubeconfig file
195219

196220
.Example usage
197221
[source,bash,options="nowrap"]
198222
----
199-
# Set server field on the my-cluster cluster to https://1.2.3.4
223+
# Set the server field on the my-cluster cluster to https://1.2.3.4
200224
oc config set clusters.my-cluster.server https://1.2.3.4
201225
202-
# Set certificate-authority-data field on the my-cluster cluster.
226+
# Set the certificate-authority-data field on the my-cluster cluster
203227
oc config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -)
204228
205-
# Set cluster field in the my-context context to my-cluster.
229+
# Set the cluster field in the my-context context to my-cluster
206230
oc config set contexts.my-context.cluster my-cluster
207231
208-
# Set client-key-data field in the cluster-admin user using --set-raw-bytes option.
232+
# Set the client-key-data field in the cluster-admin user using --set-raw-bytes option
209233
oc config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true
210234
----
211235

212236

213237

214238
== oc adm config set-cluster
215-
Sets a cluster entry in kubeconfig
239+
Set a cluster entry in kubeconfig
216240

217241
.Example usage
218242
[source,bash,options="nowrap"]
219243
----
220-
# Set only the server field on the e2e cluster entry without touching other values.
244+
# Set only the server field on the e2e cluster entry without touching other values
221245
oc config set-cluster e2e --server=https://1.2.3.4
222246
223247
# Embed certificate authority data for the e2e cluster entry
@@ -233,7 +257,7 @@ Sets a cluster entry in kubeconfig
233257

234258

235259
== oc adm config set-context
236-
Sets a context entry in kubeconfig
260+
Set a context entry in kubeconfig
237261

238262
.Example usage
239263
[source,bash,options="nowrap"]
@@ -245,13 +269,13 @@ Sets a context entry in kubeconfig
245269

246270

247271
== oc adm config set-credentials
248-
Sets a user entry in kubeconfig
272+
Set a user entry in kubeconfig
249273

250274
.Example usage
251275
[source,bash,options="nowrap"]
252276
----
253277
# Set only the "client-key" field on the "cluster-admin"
254-
# entry, without touching other values:
278+
# entry, without touching other values
255279
oc config set-credentials cluster-admin --client-key=~/.kube/admin.key
256280
257281
# Set basic auth for the "cluster-admin" entry
@@ -285,22 +309,22 @@ Sets a user entry in kubeconfig
285309

286310

287311
== oc adm config unset
288-
Unsets an individual value in a kubeconfig file
312+
Unset an individual value in a kubeconfig file
289313

290314
.Example usage
291315
[source,bash,options="nowrap"]
292316
----
293-
# Unset the current-context.
317+
# Unset the current-context
294318
oc config unset current-context
295319
296-
# Unset namespace in foo context.
320+
# Unset namespace in foo context
297321
oc config unset contexts.foo.namespace
298322
----
299323

300324

301325

302326
== oc adm config use-context
303-
Sets the current-context in a kubeconfig file
327+
Set the current-context in a kubeconfig file
304328

305329
.Example usage
306330
[source,bash,options="nowrap"]
@@ -317,10 +341,10 @@ Display merged kubeconfig settings or a specified kubeconfig file
317341
.Example usage
318342
[source,bash,options="nowrap"]
319343
----
320-
# Show merged kubeconfig settings.
344+
# Show merged kubeconfig settings
321345
oc config view
322346
323-
# Show merged kubeconfig settings and raw certificate data.
347+
# Show merged kubeconfig settings and raw certificate data
324348
oc config view --raw
325349
326350
# Get the password for the e2e user
@@ -335,7 +359,7 @@ Mark node as unschedulable
335359
.Example usage
336360
[source,bash,options="nowrap"]
337361
----
338-
# Mark node "foo" as unschedulable.
362+
# Mark node "foo" as unschedulable
339363
oc adm cordon foo
340364
----
341365

@@ -395,11 +419,11 @@ Drain node in preparation for maintenance
395419
.Example usage
396420
[source,bash,options="nowrap"]
397421
----
398-
# Drain node "foo", even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet on it.
399-
$ oc adm drain foo --force
422+
# Drain node "foo", even if there are pods not managed by a replication controller, replica set, job, daemon set or stateful set on it
423+
oc adm drain foo --force
400424
401-
# As above, but abort if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet, and use a grace period of 15 minutes.
402-
$ oc adm drain foo --grace-period=900
425+
# As above, but abort if there are pods not managed by a replication controller, replica set, job, daemon set or stateful set, and use a grace period of 15 minutes
426+
oc adm drain foo --grace-period=900
403427
----
404428

405429

@@ -782,7 +806,7 @@ Remove unreferenced images
782806
783807
# To actually perform the prune operation, the confirm flag must be appended
784808
oc adm prune images --prune-over-size-limit --confirm
785-
809+
786810
# Force the insecure http protocol with the particular registry host name
787811
oc adm prune images --registry-url=http://registry.example.org --confirm
788812
@@ -885,11 +909,11 @@ Update the taints on one or more nodes
885909
.Example usage
886910
[source,bash,options="nowrap"]
887911
----
888-
# Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'.
889-
# If a taint with that key and effect already exists, its value is replaced as specified.
912+
# Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'
913+
# If a taint with that key and effect already exists, its value is replaced as specified
890914
oc adm taint nodes foo dedicated=special-user:NoSchedule
891915
892-
# Remove from node 'foo' the taint with key 'dedicated' and effect 'NoSchedule' if one exists.
916+
# Remove from node 'foo' the taint with key 'dedicated' and effect 'NoSchedule' if one exists
893917
oc adm taint nodes foo dedicated:NoSchedule-
894918
895919
# Remove from node 'foo' all the taints with key 'dedicated'
@@ -929,7 +953,7 @@ Show usage statistics for image streams
929953

930954

931955
== oc adm top node
932-
Display Resource (CPU/Memory) usage of nodes
956+
Display resource (CPU/memory) usage of nodes
933957

934958
.Example usage
935959
[source,bash,options="nowrap"]
@@ -944,7 +968,7 @@ Display Resource (CPU/Memory) usage of nodes
944968

945969

946970
== oc adm top pod
947-
Display Resource (CPU/Memory) usage of pods
971+
Display resource (CPU/memory) usage of pods
948972

949973
.Example usage
950974
[source,bash,options="nowrap"]
@@ -970,8 +994,8 @@ Mark node as schedulable
970994
.Example usage
971995
[source,bash,options="nowrap"]
972996
----
973-
# Mark node "foo" as schedulable.
974-
$ oc adm uncordon foo
997+
# Mark node "foo" as schedulable
998+
oc adm uncordon foo
975999
----
9761000

9771001

0 commit comments

Comments
 (0)