Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 5 additions & 28 deletions cli_reference/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,20 @@ include::_attributes/common-attributes.adoc[]

toc::[]

A user performs a range of operations while working on {product-title}
ifdef::openshift-rosa[]
(ROSA)
endif::openshift-rosa[]
such as the following:
A user performs a range of operations while working on {product-title} such as the following:

* Managing clusters
* Building, deploying, and managing applications
* Managing deployment processes
* Creating and maintaining Operator catalogs

ifndef::openshift-rosa[]
{product-title}
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA
endif::openshift-rosa[]
offers a set of command-line interface (CLI) tools that simplify these tasks by enabling users to perform various administration and development operations from the terminal.
{product-title} offers a set of command-line interface (CLI) tools that simplify these tasks by enabling users to perform various administration and development operations from the terminal.
These tools expose simple commands to manage the applications, as well as interact with each component of the system.

[id="cli-tools-list"]
== List of CLI tools

The following set of CLI tools are available in
ifndef::openshift-rosa[]
{product-title}:
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA:
endif::openshift-rosa[]
The following set of CLI tools are available in {product-title}:

* xref:../cli_reference/openshift_cli/getting-started-cli.adoc#cli-getting-started[OpenShift CLI (`oc`)]:
ifndef::openshift-rosa[]
Expand All @@ -44,14 +28,7 @@ endif::openshift-rosa[]
ifdef::openshift-rosa[]
This is one of the more commonly used developer CLI tools.
endif::openshift-rosa[]
It helps both cluster administrators and developers to perform end-to-end operations across
ifndef::openshift-rosa[]
{product-title}
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA
endif::openshift-rosa[]
using the terminal. Unlike the web console, it allows the user to work directly with the project source code using command scripts.
It helps both cluster administrators and developers to perform end-to-end operations across {product-title} using the terminal. Unlike the web console, it allows the user to work directly with the project source code using command scripts.

* xref:../cli_reference/kn-cli-tools.adoc#kn-cli-tools[Knative CLI (kn)]: The Knative (`kn`) CLI tool provides simple and intuitive terminal commands that can be used to interact with OpenShift Serverless components, such as Knative Serving and Eventing.

Expand All @@ -60,5 +37,5 @@ using the terminal. Unlike the web console, it allows the user to work directly
* xref:../cli_reference/opm/cli-opm-install.adoc#cli-opm-install[opm CLI]: The `opm` CLI tool helps the Operator developers and cluster administrators to create and maintain the catalogs of Operators from the terminal.

ifdef::openshift-rosa,openshift-rosa-hcp[]
* xref:../cli_reference/rosa_cli/rosa-get-started-cli.adoc#rosa-get-started-cli[ROSA CLI (`rosa`)]: Use the `rosa` CLI to create, update, manage, and delete ROSA clusters and resources.
* xref:../cli_reference/rosa_cli/rosa-get-started-cli.adoc#rosa-get-started-cli[ROSA CLI (`rosa`)]: Use the `rosa` CLI to create, update, manage, and delete {product-title} clusters and resources.
endif::openshift-rosa,openshift-rosa-hcp[]
2 changes: 1 addition & 1 deletion cli_reference/kn-cli-tools.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Key features of the Knative CLI include:
[id="kn-cli-tools-installing-kn"]
== Installing the Knative CLI

See link:https://docs.openshift.com/serverless/1.28/install/installing-kn.html#installing-kn[Installing the Knative CLI].
See link:https://docs.redhat.com/en/documentation/red_hat_openshift_serverless/1.28/html/installing_serverless/installing-kn#installing-kn[Installing the Knative CLI].
7 changes: 1 addition & 6 deletions cli_reference/openshift_cli/managing-cli-profiles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ endif::microshift,openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
ifdef::microshift[]
user authentication
endif::[]
ifndef::openshift-rosa,openshift-rosa-hcp[]
an {product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
the {product-title} (ROSA)
endif::openshift-rosa,openshift-rosa-hcp[]
a {product-title}
server information associated with a _nickname_.

include::modules/about-cli-profiles-switch.adoc[leveloffset=+1]
Expand Down
60 changes: 6 additions & 54 deletions cli_reference/openshift_cli/usage-oc-kubectl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,18 @@
include::_attributes/common-attributes.adoc[]
:context: usage-oc-kubectl

The Kubernetes command-line interface (CLI), `kubectl`, can be used to run commands against a Kubernetes cluster. Because {product-title}
ifdef::openshift-rosa,openshift-rosa-hcp[]
(ROSA)
endif::openshift-rosa,openshift-rosa-hcp[]
is a certified Kubernetes distribution, you can use the supported `kubectl` binaries that ship with
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
, or you can gain extended functionality by using the `oc` binary.
The Kubernetes command-line interface (CLI), `kubectl`, can be used to run commands against a Kubernetes cluster. Because {product-title} is a certified Kubernetes distribution, you can use the supported `kubectl` binaries that ship with
{product-title}, or you can gain extended functionality by using the `oc` binary.

== The oc binary

The `oc` binary offers the same capabilities as the `kubectl` binary, but it extends to natively support additional
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
features, including:
{product-title} features, including:

* **Full support for
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
resources**
* **Full support for {product-title} resources**
+
Resources such as `DeploymentConfig`, `BuildConfig`, `Route`, `ImageStream`, and `ImageStreamTag` objects are specific to
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
distributions, and build upon standard Kubernetes primitives.
+
* **Authentication**
Expand All @@ -68,16 +40,9 @@ ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title} {product-version}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
. If you want the latest features, you must download and install the latest version of the `oc` binary corresponding to your
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
server version.
. If you want the latest features, you must download and install the latest version of the `oc` binary corresponding to your {product-title} server version.
====

Non-security API changes will involve, at minimum, two minor releases (4.1 to 4.2 to 4.3, for example) to allow older `oc` binaries to update. Using new capabilities might require newer `oc` binaries. A 4.3 server might have additional capabilities that a 4.2 `oc` binary cannot use and a 4.3 `oc` binary might have additional capabilities that are unsupported by a 4.2 server.
Expand Down Expand Up @@ -109,20 +74,7 @@ image:redcircle-3.png[] `oc` client might provide options and features that migh
== The kubectl binary

The `kubectl` binary is provided as a means to support existing workflows and scripts for new
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
users coming from a standard Kubernetes environment, or for those who prefer to use the `kubectl` CLI. Existing users of `kubectl` can continue to use the binary to interact with Kubernetes primitives, with no changes required to the
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title}
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
ROSA
endif::openshift-rosa,openshift-rosa-hcp[]
cluster.
{product-title} users coming from a standard Kubernetes environment, or for those who prefer to use the `kubectl` CLI. Existing users of `kubectl` can continue to use the binary to interact with Kubernetes primitives, with no changes required to the {product-title} cluster.

You can install the supported `kubectl` binary by following the steps to xref:../../cli_reference/openshift_cli/getting-started-cli.adoc#cli-installing-cli_cli-developer-commands[Install the OpenShift CLI]. The `kubectl` binary is included in the archive if you download the binary, or is installed when you install the CLI by using an RPM.

Expand Down
10 changes: 6 additions & 4 deletions cli_reference/rosa_cli/rosa-cli-permission-examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include::_attributes/attributes-openshift-dedicated.adoc[]
:context: rosa-cli-permission-examples
toc::[]

You can create roles with permissions that adhere to the principal of least privilege, in which the users assigned the roles have no other permissions assigned to them outside the scope of the specific action they need to perform. These policies contain only the minimum required permissions needed to perform specific actions by using the {product-title} (ROSA) command-line interface (CLI).
You can create roles with permissions that adhere to the principal of least privilege, in which the users assigned the roles have no other permissions assigned to them outside the scope of the specific action they need to perform. These policies contain only the minimum required permissions needed to perform specific actions by using the {rosa-cli-first}.

[IMPORTANT]
====
Expand All @@ -20,11 +20,13 @@ Although the policies and commands presented in this topic will work in conjunct

For more information about configuring permissions, policies, and roles in the AWS console, see link:https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html[AWS Identity and Access Management] in the AWS documentation.

include::modules/rosa-cli-hcp-classic-examples.adoc[leveloffset=+1]

// include::modules/rosa-cli-hcp-classic-examples.adoc[leveloffset=+1]
ifdef::openshift-rosa-hcp[]
include::modules/rosa-cli-hcp-examples.adoc[leveloffset=+1]
endif::openshift-rosa-hcp[]
ifdef::openshift-rosa[]
include::modules/rosa-cli-classic-examples.adoc[leveloffset=+1]

endif::openshift-rosa[]
include::modules/rosa-cli-no-permissions-required.adoc[leveloffset=+1]

[role="_additional-resources"]
Expand Down
8 changes: 5 additions & 3 deletions cli_reference/rosa_cli/rosa-manage-objects-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include::_attributes/attributes-openshift-dedicated.adoc[]

toc::[]

Managing objects with the {product-title} (ROSA) CLI, `rosa`, such as adding `dedicated-admin` users, managing clusters, and scheduling cluster upgrades.
Managing objects with the {rosa-cli-first}, such as adding `dedicated-admin` users, managing clusters, and scheduling cluster upgrades.

[NOTE]
====
Expand Down Expand Up @@ -35,11 +35,13 @@ include::modules/rosa-edit-objects.adoc[leveloffset=+1]
ifdef::openshift-rosa[]
* See xref:../../networking/networking_operators/ingress-operator.adoc#configuring-ingress-controller[Configuring the Ingress Controller] for information regarding editing non-default application routers.
endif::openshift-rosa[]
//Classic to HCP breakout. Remove ROSA-specific conditionals when networking is added to HCP.
//Classic to HCP breakout. Remove ROSA-specific conditionals when networking is added to HCP.

include::modules/rosa-delete-objects.adoc[leveloffset=+1]
include::modules/rosa-install-uninstall-addon.adoc[leveloffset=+1]
include::modules/rosa-list-objects.adoc[leveloffset=+1]
ifdef::openshift-rosa-hcp[]
include::modules/rosa-revoke-objects.adoc[leveloffset=+1]
endif::openshift-rosa-hcp[]
include::modules/rosa-upgrade-cluster-cli.adoc[leveloffset=+1]

4 changes: 2 additions & 2 deletions cli_reference/rosa_cli/rosa-updating-billing-account-cli.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:_mod-docs-content-type: ASSEMBLY
include::_attributes/attributes-openshift-dedicated.adoc[]
[id="rosa-updating-account-cli"]
= Managing billing accounts for ROSA with HCP clusters
= Managing billing accounts for {product-title} clusters
:context: rosa-updating-account-cli
toc::[]

Expand All @@ -12,7 +12,7 @@ This can be useful if you have accidentally linked to the wrong AWS billing acco

[NOTE]
====
You also have the option to update your billing account through the {cluster-manager}. For more information, see link:https://docs.redhat.com/en/documentation/openshift_cluster_manager/1-latest/html-single/managing_clusters/index#proc_updating-billing-accts-rosa-hcp_assembly-managing-clusters[Updating billing accounts for OpenShift Service on AWS Hosted Control Planes clusters.]
You also have the option to update your billing account through the {cluster-manager}. For more information, see link:https://docs.redhat.com/en/documentation/openshift_cluster_manager/1-latest/html-single/managing_clusters/index#proc_updating-billing-accts-rosa-hcp_assembly-managing-clusters[Updating billing accounts for {product-title} clusters.]
====


Expand Down
25 changes: 3 additions & 22 deletions modules/about-cli-profiles-switch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,9 @@
[id="about-switches-between-cli-profiles_{context}"]
= About switches between CLI profiles

Contexts allow you to easily switch between multiple users across multiple
ifndef::openshift-rosa[]
{product-title}
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA
endif::openshift-rosa[]
servers, or clusters, when using CLI operations. Nicknames make managing CLI configurations easier by providing short-hand references to contexts, user credentials, and cluster details.
Contexts allow you to easily switch between multiple users across multiple {product-title} servers, or clusters, when using CLI operations. Nicknames make managing CLI configurations easier by providing short-hand references to contexts, user credentials, and cluster details.
After a user logs in with the `oc` CLI for the first time,
ifndef::openshift-rosa[]
{product-title}
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA
endif::openshift-rosa[]
creates a `~/.kube/config` file if one does not already exist. As more authentication and connection details are provided to the CLI, either automatically during an `oc login` operation or by manually configuring CLI profiles, the updated information is stored in the configuration file:
{product-title} creates a `~/.kube/config` file if one does not already exist. As more authentication and connection details are provided to the CLI, either automatically during an `oc login` operation or by manually configuring CLI profiles, the updated information is stored in the configuration file:

.CLI config file

Expand Down Expand Up @@ -58,13 +45,7 @@ users: <4>
----

<1> The `clusters` section defines connection details for
ifndef::openshift-rosa[]
{product-title}
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA
endif::openshift-rosa[]
clusters, including the address for their master server. In this example, one cluster is nicknamed `openshift1.example.com:8443` and another is nicknamed `openshift2.example.com:8443`.
{product-title} clusters, including the address for their master server. In this example, one cluster is nicknamed `openshift1.example.com:8443` and another is nicknamed `openshift2.example.com:8443`.
<2> This `contexts` section defines two contexts: one nicknamed `alice-project/openshift1.example.com:8443/alice`, using the `alice-project` project, `openshift1.example.com:8443` cluster, and `alice` user, and another nicknamed `joe-project/openshift1.example.com:8443/alice`, using the `joe-project` project, `openshift1.example.com:8443` cluster and `alice` user.
<3> The `current-context` parameter shows that the `joe-project/openshift1.example.com:8443/alice` context is currently in use, allowing the `alice` user to work in the `joe-project` project on the `openshift1.example.com:8443` cluster.
<4> The `users` section defines user credentials. In this example, the user nickname `alice/openshift1.example.com:8443` uses an access token.
Expand Down
8 changes: 4 additions & 4 deletions modules/cli-extending-plugins-installing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
= Installing and using CLI plugins

After you write a custom plugin for the
ifndef::openshift-rosa,openshift-dedicated[]
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
{product-title}
endif::openshift-rosa,openshift-dedicated[]
ifdef::openshift-rosa,openshift-dedicated[]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
OpenShift
endif::openshift-rosa,openshift-dedicated[]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
CLI, you must install
the plugin before use.

Expand Down
16 changes: 8 additions & 8 deletions modules/cli-extending-plugins-writing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
= Writing CLI plugins

You can write a plugin for the
ifndef::openshift-rosa,openshift-dedicated[]
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
{product-title}
endif::openshift-rosa,openshift-dedicated[]
ifdef::openshift-rosa,openshift-dedicated[]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
OpenShift
endif::openshift-rosa,openshift-dedicated[]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
CLI in any programming language
or script that allows you to write command-line commands. Note that you can not
use a plugin to overwrite an existing `oc` command.
Expand Down Expand Up @@ -58,12 +58,12 @@ echo "I am a plugin named kubectl-foo"
----

After you install this plugin for the
ifndef::openshift-rosa,openshift-dedicated[]
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
{product-title}
endif::openshift-rosa,openshift-dedicated[]
ifdef::openshift-rosa[]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
OpenShift
endif::openshift-rosa[]
endif::openshift-rosa,openshift-rosa-hcp[]
CLI, it can be invoked
using the `oc foo` command.

Expand Down
8 changes: 1 addition & 7 deletions modules/cli-getting-help.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
[id="cli-getting-help_{context}"]
= Getting help

You can get help with CLI commands and
ifndef::openshift-rosa[]
{product-title}
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA
endif::openshift-rosa[]
You can get help with CLI commands and {product-title}
resources in the following ways:

* Use `oc help` to get a list and description of all available CLI commands:
Expand Down
6 changes: 1 addition & 5 deletions modules/cli-installing-cli-rpm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
[id="cli-installing-cli-rpm_{context}"]
= Installing the OpenShift CLI by using an RPM

For {op-system-base-full}, you can install the {oc-first} as an RPM if you have an active {product-title}
ifdef::openshift-rosa[]
(ROSA)
endif::openshift-rosa[]
subscription on your Red Hat account.
For {op-system-base-full}, you can install the {oc-first} as an RPM if you have an active {product-title} subscription on your Red Hat account.

[IMPORTANT]
====
Expand Down
21 changes: 7 additions & 14 deletions modules/cli-installing-cli-web-console.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@ endif::[]
[id="cli-installing-cli-web-console_{context}"]
= Installing the OpenShift CLI by using the web console

You can install the {oc-first} to interact with {product-title}
ifdef::openshift-rosa[]
(ROSA)
endif::openshift-rosa[]
ifdef::openshift-dedicated[]
clusters
endif::openshift-dedicated[]
from a web console. You can install `oc` on Linux, Windows, or macOS.
You can install the {oc-first} to interact with {product-title} clusters from a web console. You can install `oc` on Linux, Windows, or macOS.

[IMPORTANT]
====
If you installed an earlier version of `oc`, you cannot use it to complete all
of the commands in
ifndef::openshift-rosa[]
of the commands in
ifndef::openshift-rosa,openshift-rosa-hcp[]
{product-title} {product-version}.
endif::openshift-rosa[]
ifdef::openshift-rosa[]
ROSA.
endif::openshift-rosa[]
endif::openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-rosa,openshift-rosa-hcp[]
{product-title}.
endif::openshift-rosa,openshift-rosa-hcp[]
Download and
install the new version of `oc`.
ifdef::restricted[]
Expand Down
Loading