1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/cli-developer-advanced.adoc
2019-03-19 08:21:41 -04:00

148 lines
3.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * cli_reference/developer-cli-commands.adoc
[id="cli-advanced-developer-commands-{context}"]
= Advanced developer CLI commands
== api-resources
Display the full list of API resources that the server supports.
.Example: List the supported API resources
----
$ oc api-resources
----
== api-versions
Display the full list of API versions that the server supports.
.Example: List the supported API versions
----
$ oc api-versions
----
== auth
Inspect permissions and reconcile RBAC roles.
.Example: Check whether the current user can read Pod logs
----
$ oc auth can-i get pods --subresource=log
----
.Example: Reconcile RBAC roles and permissions from a file
----
$ oc auth reconcile -f policy.json
----
== cluster-info
Display the address of the master and cluster services.
.Example: Display cluster information
----
$ oc cluster-info
----
== convert
Convert a YAML or JSON configuration file to a different API version and print
to standard output (stdout).
.Example: Convert `pod.yaml` to the latest version
----
$ oc convert -f pod.yaml
----
== extract
Extract the contents of a ConfigMap or secret. Each key in the ConfigMap or
secret is created as a separate file with the name of the key.
.Example: Download the contents of the `ruby-1-ca` ConfigMap to the current directory
----
$ oc extract configmap/ruby-1-ca
----
.Example: Print the contents of the `ruby-1-ca` ConfigMap to stdout
----
$ oc extract configmap/ruby-1-ca --to=-
----
== idle
Idle scalable resources. An idled Service will automatically become unidled when
it receives traffic or it can be manually unidled using the `oc scale` command.
.Example: Idle the `ruby-app` Service
----
$ oc idle ruby-app
----
== image
Manage images in your {product-title} cluster.
.Example: Copy an image to another tag
----
$ oc image mirror myregistry.com/myimage:latest myregistry.com/myimage:stable
----
== observe
Observe changes to resources and take action on them.
.Example: Observe changes to Services
----
$ oc observe services
----
== patch
Updates one or more fields of an object using strategic merge patch in JSON or
YAML format.
.Example: Update the `spec.unschedulable` field for node `node1` to `true`
----
$ oc patch node/node1 -p '{"spec":{"unschedulable":true}}'
----
== policy
Manage authorization policies.
.Example: Add the `edit` role to `user1` for the current project
----
$ oc policy add-role-to-user edit user1
----
== process
Process a template into a list of resources.
.Example: Convert `template.json` to a resource list and pass to `oc create`
----
$ oc process -f template.json | oc create -f -
----
== registry
Manage the integrated registry on {product-title}.
.Example: Display information about the integrated registry
----
$ oc registry info
----
== replace
Modify an existing object based on the contents of the specified configuration
file.
.Example: Update a Pod using the content in `pod.json`
----
$ oc replace -f pod.json
----