-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS#11308: Generating CLI docs for 4.17 #81546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,12 +80,12 @@ Deny a certificate signing request | |
|
|
||
|
|
||
| == oc adm copy-to-node | ||
| Copies specified files to the node. | ||
| Copy specified files to the node | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # copy a new bootstrap kubeconfig file to node-0 | ||
| # Copy a new bootstrap kubeconfig file to node-0 | ||
| oc adm copy-to-node --copy=new-bootstrap-kubeconfig=/etc/kubernetes/kubeconfig node/node-0 | ||
| ---- | ||
|
|
||
|
|
@@ -340,31 +340,72 @@ Create a new project | |
|
|
||
|
|
||
|
|
||
| == oc adm node-image create | ||
| Create an ISO image for booting the nodes to be added to the target cluster | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Create the ISO image and download it in the current folder | ||
| oc adm node-image create | ||
|
|
||
| # Use a different assets folder | ||
| oc adm node-image create --dir=/tmp/assets | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here : There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this example the |
||
|
|
||
| # Specify a custom image name | ||
| oc adm node-image create -o=my-node.iso | ||
|
|
||
| # Create an ISO to add a single node without using the configuration file | ||
| oc adm node-image create --mac-address=00:d8:e7:c7:4b:bb | ||
|
|
||
| # Create an ISO to add a single node with a root device hint and without | ||
| # using the configuration file | ||
| oc adm node-image create --mac-address=00:d8:e7:c7:4b:bb --root-device-hint=deviceName:/dev/sda | ||
| ---- | ||
|
|
||
|
|
||
|
|
||
| == oc adm node-image monitor | ||
| Monitor new nodes being added to an OpenShift cluster | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Monitor a single node being added to a cluster | ||
| oc adm node-image monitor --ip-addresses 192.168.111.83 | ||
|
|
||
| # Monitor multiple nodes being added to a cluster by separating each | ||
| IP address with a comma | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that I've submitted a fix for this line (should be commented out) here: openshift/oc#1872 |
||
| oc adm node-image monitor --ip-addresses 192.168.111.83,192.168.111.84 | ||
| ---- | ||
|
|
||
|
|
||
|
|
||
| == oc adm node-logs | ||
| Display and filter node logs | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Show kubelet logs from all masters | ||
| # Show kubelet logs from all control plane nodes | ||
| oc adm node-logs --role master -u kubelet | ||
|
|
||
| # See what logs are available in masters in /var/log | ||
| # See what logs are available in control plane nodes in /var/log | ||
| oc adm node-logs --role master --path=/ | ||
|
|
||
| # Display cron log file from all masters | ||
| # Display cron log file from all control plane nodes | ||
| oc adm node-logs --role master --path=cron | ||
| ---- | ||
|
|
||
|
|
||
|
|
||
| == oc adm ocp-certificates monitor-certificates | ||
| Watch platform certificates. | ||
| Watch platform certificates | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Watch platform certificates. | ||
| # Watch platform certificates | ||
| oc adm ocp-certificates monitor-certificates | ||
| ---- | ||
|
|
||
|
|
@@ -376,7 +417,7 @@ Regenerate client and serving certificates of an OpenShift cluster | |
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Regenerate a leaf certificate contained in a particular secret. | ||
| # Regenerate a leaf certificate contained in a particular secret | ||
| oc adm ocp-certificates regenerate-leaf -n openshift-config-managed secret/kube-controller-manager-client-cert-key | ||
| ---- | ||
|
|
||
|
|
@@ -403,7 +444,7 @@ Regenerate the top level certificates in an OpenShift cluster | |
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Regenerate the signing certificate contained in a particular secret. | ||
| # Regenerate the signing certificate contained in a particular secret | ||
| oc adm ocp-certificates regenerate-top-level -n openshift-kube-apiserver-operator secret/loadbalancer-serving-signer-key | ||
| ---- | ||
|
|
||
|
|
@@ -484,6 +525,30 @@ Make project network global | |
|
|
||
|
|
||
|
|
||
| == oc adm policy add-cluster-role-to-group | ||
| Add a role to groups for all projects in the cluster | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Add the 'cluster-admin' cluster role to the 'cluster-admins' group | ||
| oc adm policy add-cluster-role-to-group cluster-admin cluster-admins | ||
| ---- | ||
|
|
||
|
|
||
|
|
||
| == oc adm policy add-cluster-role-to-user | ||
| Add a role to users for all projects in the cluster | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Add the 'system:build-strategy-docker' cluster role to the 'devuser' user | ||
| oc adm policy add-cluster-role-to-user system:build-strategy-docker devuser | ||
| ---- | ||
|
|
||
|
|
||
|
|
||
| == oc adm policy add-role-to-user | ||
| Add a role to users or service accounts for the current project | ||
|
|
||
|
|
@@ -526,6 +591,30 @@ Add a security context constraint to users or a service account | |
|
|
||
|
|
||
|
|
||
| == oc adm policy remove-cluster-role-from-group | ||
| Remove a role from groups for all projects in the cluster | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Remove the 'cluster-admin' cluster role from the 'cluster-admins' group | ||
| oc adm policy remove-cluster-role-from-group cluster-admin cluster-admins | ||
| ---- | ||
|
|
||
|
|
||
|
|
||
| == oc adm policy remove-cluster-role-from-user | ||
| Remove a role from users for all projects in the cluster | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Remove the 'system:build-strategy-docker' cluster role from the 'devuser' user | ||
| oc adm policy remove-cluster-role-from-user system:build-strategy-docker devuser | ||
| ---- | ||
|
|
||
|
|
||
|
|
||
| == oc adm policy scc-review | ||
| Check which service account can create a pod | ||
|
|
||
|
|
@@ -687,7 +776,7 @@ Lists rendered MachineConfigs in an OpenShift cluster | |
|
|
||
|
|
||
| == oc adm reboot-machine-config-pool | ||
| Initiate reboot of the specified MachineConfigPool. | ||
| Initiate reboot of the specified MachineConfigPool | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
|
|
@@ -800,18 +889,18 @@ Create a new OpenShift release | |
|
|
||
|
|
||
| == oc adm restart-kubelet | ||
| Restarts kubelet on the specified nodes | ||
| Restart kubelet on the specified nodes | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Restart all the nodes, 10% at a time | ||
| # Restart all the nodes, 10% at a time | ||
| oc adm restart-kubelet nodes --all --directive=RemoveKubeletKubeconfig | ||
|
|
||
| # Restart all the nodes, 20 nodes at a time | ||
| # Restart all the nodes, 20 nodes at a time | ||
| oc adm restart-kubelet nodes --all --parallelism=20 --directive=RemoveKubeletKubeconfig | ||
|
|
||
| # Restart all the nodes, 15% at a time | ||
| # Restart all the nodes, 15% at a time | ||
| oc adm restart-kubelet nodes --all --parallelism=15% --directive=RemoveKubeletKubeconfig | ||
|
|
||
| # Restart all the masters at the same time | ||
|
|
@@ -976,12 +1065,12 @@ Wait for nodes to reboot after running `oc adm reboot-machine-config-pool` | |
|
|
||
|
|
||
| == oc adm wait-for-stable-cluster | ||
| wait for the platform operators to become stable | ||
| Wait for the platform operators to become stable | ||
|
|
||
| .Example usage | ||
| [source,bash,options="nowrap"] | ||
| ---- | ||
| # Wait for all clusteroperators to become stable | ||
| # Wait for all cluster operators to become stable | ||
| oc adm wait-for-stable-cluster | ||
|
|
||
| # Consider operators to be stable if they report as such for 5 minutes straight | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhouying7780 if I look at the help for
oc adm node-image create, it does say this:So I think this means that this file must exist (either in the current folder for this command, or in the /tmp/assets/ folder for the next command) for these commands to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. If the
--diroption is not configured (and no single node flag is used), by default the asset is equal to the current working directory