このコンテンツは選択した言語では利用できません。
Chapter 7. ROSA CLI
7.1. Get started with the ROSA CLI リンクのコピーリンクがクリップボードにコピーされました!
Learn how to install, configure, and update the ROSA command-line interface (CLI) (rosa). You can use the rosa CLI to create, update, manage, and delete Red Hat OpenShift Service on AWS clusters and resources.
7.1.1. Setting up the ROSA CLI リンクのコピーリンクがクリップボードにコピーされました!
Put the ROSA command-line interface (CLI) (rosa) on the computer you use to run cluster commands.
Procedure
Install and configure the latest AWS CLI (
aws).Follow the AWS Command Line Interface documentation to install and configure the AWS CLI for your operating system.
Put
aws_access_key_id,aws_secret_access_key, andregionin the.aws/credentialsfile. See AWS Configuration basics in the AWS documentation.NoteYou can optionally use the
AWS_DEFAULT_REGIONenvironment variable to set the default AWS region.Query the AWS API to verify if the AWS CLI is installed and configured correctly:
$ aws sts get-caller-identity --output textExample output
<aws_account_id> arn:aws:iam::<aws_account_id>:user/<username> <aws_user_id>
-
Download the latest version of the ROSA command-line interface (CLI) (
rosa) for your operating system from the Downloads page on OpenShift Cluster Manager. Extract the
rosabinary file from the downloaded archive. The following example extracts the binary from a Linux tar archive:$ tar xvf rosa-linux.tar.gzAdd
rosato your path. In the following example, the/usr/local/bindirectory is included in the path of the user:$ sudo mv rosa /usr/local/bin/rosaVerify if the
rosaCLI is installed correctly by querying therosaversion:$ rosa versionExample output
1.2.15 Your rosa CLI is up to date.Optional: Turn on tab completion for the
rosaCLI. PressTabtwice to finish subcommands or see hints:To enable persistent tab completion for Bash on a Linux host:
Generate a
rosatab completion configuration file for Bash and save it to your/etc/bash_completion.d/directory:# rosa completion bash > /etc/bash_completion.d/rosa- Open a new terminal to activate the configuration.
To enable persistent tab completion for Bash on a macOS host:
Generate a
rosatab completion configuration file for Bash and save it to your/usr/local/etc/bash_completion.d/directory:$ rosa completion bash > /usr/local/etc/bash_completion.d/rosa- Open a new terminal to activate the configuration.
To enable persistent tab completion for Zsh:
If tab completion is not enabled for your Zsh environment, enable it by running the following command:
$ echo "autoload -U compinit; compinit" >> ~/.zshrcGenerate a
rosatab completion configuration file for Zsh and save it to the first directory in your functions path:$ rosa completion zsh > "${fpath[1]}/_rosa"- Open a new terminal to activate the configuration.
To enable persistent tab completion for fish:
Generate a
rosatab completion configuration file for fish and save it to your~/.config/fish/completions/directory:$ rosa completion fish > ~/.config/fish/completions/rosa.fish- Open a new terminal to activate the configuration.
To enable persistent tab completion for PowerShell:
Generate a
rosatab completion configuration file for PowerShell and save it to a file namedrosa.ps1:PS> rosa completion powershell | Out-String | Invoke-Expression-
Source the
rosa.ps1file from your PowerShell profile.
NoteFor more information about configuring
rosatab completion, see the help menu by running therosa completion --helpcommand.
7.1.2. About logging in to the ROSA CLI リンクのコピーリンクがクリップボードにコピーされました!
You can log in to the ROSA command-line interface (CLI) (rosa) with Red Hat single sign-on or with an offline authentication token. Red Hat recommends using the rosa CLI with Red Hat single sign-on, instead of using an offline authentication token.
An offline authentication token is long-lived, stored on your operating system, and cannot be revoked. These factors increase overall security risks and the likelihood of unauthorized access to your account.
Alternatively, authenticating with the Red Hat single sign-on method automatically sends your rosa instance a refresh token that is valid for 10 hours. This unique, temporary authorization code enhances security and reduces the risk of unauthorized access.
The method of authenticating using Red Hat single sign-on does not break any existing automations that rely on offline tokens. Red Hat recommends using services accounts for automation purposes. If you still need to use offline tokens for automation or other purposes, you can download the pull secret from Red Hat OpenShift Cluster Manager.
7.1.2.1. Authentication methods リンクのコピーリンクがクリップボードにコピーされました!
You can use one of the following methods to authenticate:
-
Single sign-on authorization code: Use this method if your system has a web browser. Single sign-on authorization is supported with
rosaCLI version 1.2.36 or later. -
Single sign-on device code: Use this method if you are working with containers, remote hosts, or other environments without a web browser. Single sign-on authorization is supported with
rosaCLI version 1.2.36 or later. - Offline token: Use this method if you need to use an offline token for automation or other purposes. Red Hat recommends using service accounts for automation purposes instead.
7.1.3. Authenticate the ROSA CLI with a single sign-on authorization code リンクのコピーリンクがクリップボードにコピーされました!
You can log in to your account with the rosa CLI by using a Red Hat single sign-on authorization code.
Prerequisites
- You have a web browser available on your system.
-
You have
rosaCLI version 1.2.36 or later installed.
Procedure
To log in to the ROSA command-line interface (CLI) (
rosa) with a Red Hat single sign-on authorization code, run the following command:Syntax
$ rosa login --use-auth-codeRunning this command redirects you to the Red Hat single sign-on login. Log in with your Red Hat login or email.
Table 7.1. Optional arguments inherited from parent commands+ Option Definition --help
Shows help for this command.
--debug
Enables debug mode.
Verification
To switch accounts, log out from https://sso.redhat.com and run the rosa logout command in your terminal before attempting to log in again.
7.1.4. Authenticate the ROSA CLI with a single sign-on device code リンクのコピーリンクがクリップボードにコピーされました!
If you are working with containers, remote hosts, and other environments without a web browser, you can use a Red Hat single sign-on device code for secure authentication. To do this, you must use a second device that has a web browser to approve the login.
Prerequisites
-
You have ROSA command-line interface (CLI) (
rosa) version 1.2.36 or later installed. - You have access to a second device with a web browser.
Procedure
To log in to the
rosaCLI with a Red Hat single sign-on device code, run the following command:$ rosa login --use-device-codeRunning this command redirects you to the Red Hat SSO login and provides a login code.
Table 7.2. Optional arguments inherited from parent commands Option Definition --help
Shows help for this command.
--debug
Enables debug mode.
Verification
To switch accounts, log out from https://sso.redhat.com and run the rosa logout command in your terminal before attempting to log in again.
7.1.5. Authenticate the ROSA CLI with an offline token リンクのコピーリンクがクリップボードにコピーされました!
Log in to your Red Hat account, saving the credentials to the rosa configuration file.
To use offline tokens for automation purposes, you can download the pull secret from Red Hat OpenShift Cluster Manager. To use service accounts for automation purposes, see the Service Accounts page.
Red Hat recommends using service accounts for automation purposes.
Procedure
To log in to ROSA command-line interface (CLI) (
rosa) with a Red Hat offline token, run the following command:Syntax
$ rosa login [arguments]Table 7.3. Arguments Option Definition --client-id
The OpenID client identifier (string). Default:
cloud-services--client-secret
The OpenID client secret (string).
--insecure
Enables insecure communication with the server. This disables verification of TLS certificates and host names.
--scope
The OpenID scope (string). If this option is used, it replaces the default scopes. This can be repeated multiple times to specify multiple scopes. Default:
openid--token
Accesses or refreshes the token (string).
--token-url
The OpenID token URL (string). Default:
https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/tokenTable 7.4. Optional arguments inherited from parent commands Option Definition --help
Shows help for this command.
--debug
Enables debug mode.
--profile
Specifies an AWS profile (string) from your credentials file.
7.1.6. Log out of the ROSA CLI リンクのコピーリンクがクリップボードにコピーされました!
Log out of rosa. Logging out also removes the rosa configuration file.
Procedure
Log out of your
rosasession by running the following command:$ rosa logout [arguments]Table 7.5. Optional arguments inherited from parent commands Option Definition --help
Shows help for this command.
--debug
Enables debug mode.
--profile
Specifies an AWS profile (string) from your credentials file.
7.1.7. Verify AWS settings with the ROSA CLI リンクのコピーリンクがクリップボードにコピーされました!
Verify AWS permissions and quotas by using the ROSA command-line interface (CLI) (rosa).
7.1.7.1. verify permissions リンクのコピーリンクがクリップボードにコピーされました!
Verify that the AWS permissions required to create a Red Hat OpenShift Service on AWS cluster are configured correctly:
Syntax
$ rosa verify permissions [arguments]
This command verifies permissions only for clusters that do not use the AWS Security Token Service (STS).
| Option | Definition |
|---|---|
| --help | Shows help for this command. |
| --debug | Enables debug mode. |
| --region |
The AWS region (string) in which to run the command. This value overrides the |
| --profile | Specifies an AWS profile (string) from your credentials file. |
Verify that the AWS permissions are configured correctly:
Example
$ rosa verify permissions
Verify that the AWS permissions are configured correctly in a specific region:
Example
$ rosa verify permissions --region=us-west-2
7.1.7.2. verify quota リンクのコピーリンクがクリップボードにコピーされました!
Verifies that AWS quotas are configured correctly for your default region.
Syntax
$ rosa verify quota [arguments]
| Option | Definition |
|---|---|
| --help | Shows help for this command. |
| --debug | Enables debug mode. |
| --region |
The AWS region (string) in which to run the command. This value overrides the |
| --profile | Specifies an AWS profile (string) from your credentials file. |
Verify that the AWS quotas are configured correctly for the default region:
Example
$ rosa verify quota
Verify that the AWS quotas are configured correctly in a specific region:
Example
$ rosa verify quota --region=us-west-2
7.1.8. Download CLI tools with the ROSA CLI リンクのコピーリンクがクリップボードにコピーされました!
Download and verify the rosa and oc CLI tools by using the ROSA command-line interface (CLI) (rosa).
7.1.8.1. download rosa リンクのコピーリンクがクリップボードにコピーされました!
Download the latest compatible version of the rosa CLI.
After you download rosa CLI, extract the contents of the archive and add it to your path.
Syntax
$ rosa download rosa [arguments]
| Option | Definition |
|---|---|
| --help | Shows help for this command. |
| --debug | Enables debug mode. |
7.1.8.2. download oc リンクのコピーリンクがクリップボードにコピーされました!
Download the latest compatible version of the OpenShift CLI (oc).
After you download oc, you must extract the contents of the archive and add it to your path.
Syntax
$ rosa download oc [arguments]
| Option | Definition |
|---|---|
| --help | Shows help for this command. |
| --debug | Enables debug mode. |
Download oc client tools:
Example
$ rosa download oc
7.1.8.3. verify oc リンクのコピーリンクがクリップボードにコピーされました!
Verifies that the OpenShift CLI (oc) installed correctly.
Syntax
$ rosa verify oc [arguments]
| Option | Definition |
|---|---|
| --help | Shows help for this command. |
| --debug | Enables debug mode. |
Verify oc client tools:
Example
$ rosa verify oc
7.1.9. Updating the ROSA CLI リンクのコピーリンクがクリップボードにコピーされました!
Update the ROSA command-line interface (CLI) (rosa) to the latest version that works with your cluster.
Procedure
Confirm that a new version of the
rosaCLI (rosa) is available:$ rosa versionExample output
1.2.12 There is a newer release version '1.2.15', please consider updating: https://mirror.openshift.com/pub/openshift-v4/clients/rosa/latest/Download the latest compatible version of the
rosaCLI:$ rosa download rosaThis command downloads an archive called
rosa-*.tar.gzinto the current directory. The exact name of the file depends on your operating system and system architecture.Extract the contents of the archive:
$ tar -xzf rosa-linux.tar.gzInstall the new version of the
rosaCLI by moving the extracted file into your path. In the following example, your path includes the/usr/local/bindirectory:$ sudo mv rosa /usr/local/bin/rosa
Verification
Verify the new version of the
rosaCLI installed successfully.$ rosa versionExample output
1.2.15 Your rosa CLI is up to date.
7.2. ROSA CLI command reference リンクのコピーリンクがクリップボードにコピーされました!
This reference provides descriptions and example commands for ROSA command-line interface (CLI) (rosa) commands.
Run rosa -h to list all commands or run rosa <command> --help to get additional details for a specific command.
7.2.1. ROSA CLI commands リンクのコピーリンクがクリップボードにコピーされました!
ROSA command-line interface (CLI) (rosa) offers the following options for interacting with your cluster.
7.2.1.1. rosa create account-roles リンクのコピーリンクがクリップボードにコピーされました!
Create account-wide Identity and Access Management (IAM) roles before creating your cluster.
Example usage
# Create default account roles for ROSA clusters using STS
rosa create account-roles
# Create account roles with a specific permissions boundary
rosa create account-roles --permissions-boundary arn:aws:iam::123456789012:policy/perm-boundary
7.2.1.2. rosa create admin リンクのコピーリンクがクリップボードにコピーされました!
Creates an admin user to login to the cluster
Example usage
# Create an admin user to login to the cluster
rosa create admin -c mycluster -p MasterKey123
7.2.1.3. rosa create autoscaler リンクのコピーリンクがクリップボードにコピーされました!
Create an autoscaler for a cluster
Example usage
# Interactively create an autoscaler to a cluster named "mycluster"
rosa create autoscaler --cluster=mycluster --interactive
# Create a cluster-autoscaler where it should skip nodes with local storage
rosa create autoscaler --cluster=mycluster --skip-nodes-with-local-storage
# Create a cluster-autoscaler with log verbosity of '3'
rosa create autoscaler --cluster=mycluster --log-verbosity 3
# Create a cluster-autoscaler with total CPU constraints
rosa create autoscaler --cluster=mycluster --min-cores 10 --max-cores 100
7.2.1.4. rosa create break-glass-credential リンクのコピーリンクがクリップボードにコピーされました!
Create a break glass credential for a cluster.
Example usage
# Interactively create a break glass credential to a cluster named "mycluster"
rosa create break-glass-credential --cluster=mycluster --interactive
7.2.1.5. rosa create cluster リンクのコピーリンクがクリップボードにコピーされました!
Create cluster
Example usage
# Create a cluster named "mycluster"
rosa create cluster --cluster-name=mycluster
# Create a cluster in the us-east-2 region
rosa create cluster --cluster-name=mycluster --region=us-east-2
7.2.1.6. rosa create decision リンクのコピーリンクがクリップボードにコピーされました!
Create a decision for an Access Request
Example usage
# Create a decision for an Access Request to approve it
rosa create decision --access-request <access_request_id> --decision Approved
7.2.1.7. rosa create dns-domain リンクのコピーリンクがクリップボードにコピーされました!
Create Domain Name System (DNS) domain.
Example usage
# Create DNS Domain
rosa create dns-domain
7.2.1.8. rosa create external-auth-provider リンクのコピーリンクがクリップボードにコピーされました!
Create an external authentication provider for a cluster.
Example usage
# Interactively create an external authentication provider to a cluster named "mycluster"
rosa create external-auth-provider --cluster=mycluster --interactive
7.2.1.9. rosa create iamserviceaccount リンクのコピーリンクがクリップボードにコピーされました!
Create IAM role for Kubernetes service account
Example usage
# Create an IAM role for a service account
rosa create iamserviceaccount --cluster my-cluster --name my-app --namespace default
7.2.1.10. rosa create idp リンクのコピーリンクがクリップボードにコピーされました!
Add an identity provider (IDP) for a cluster
Example usage
# Add a GitHub identity provider to a cluster named "mycluster"
rosa create idp --type=github --cluster=mycluster
# Add an identity provider following interactive prompts
rosa create idp --cluster=mycluster --interactive
7.2.1.11. rosa create image-mirror リンクのコピーリンクがクリップボードにコピーされました!
Create image mirror for a cluster
Example usage
# Create an image mirror for cluster "mycluster"
rosa create image-mirror --cluster=mycluster \
--source=registry.example.com/team \
--mirrors=mirror.corp.com/team,backup.corp.com/team
# Create with a specific type (digest is default and only supported type)
rosa create image-mirror --cluster=mycluster \
--type=digest --source=docker.io/library \
--mirrors=internal-registry.company.com/dockerhub
7.2.1.12. rosa create kubeletconfig リンクのコピーリンクがクリップボードにコピーされました!
Create a custom kubeletconfig for a cluster
Example usage
# Create a custom kubeletconfig with a pod-pids-limit of 5000
rosa create kubeletconfig --cluster=mycluster --pod-pids-limit=5000
7.2.1.13. rosa create log-forwarder リンクのコピーリンクがクリップボードにコピーされました!
Create a log forwarder for a Hosted Control Plane cluster
Example usage
# Create a log forwarder using a config file
rosa create log-forwarder -c mycluster-hcp --log-fwd-config=s3.yml
# Create a log forwarder interactively
rosa create log-forwarder -c mycluster-hcp --interactive
7.2.1.14. rosa create machinepool リンクのコピーリンクがクリップボードにコピーされました!
Add machine pool to cluster
Example usage
# Interactively add a machine pool to a cluster named "mycluster"
rosa create machinepool --cluster=mycluster --interactive
# Add a machine pool mp-1 with 3 replicas of m7i.xlarge to a cluster
rosa create machinepool --cluster=mycluster --name=mp-1 --replicas=3 --instance-type=m7i.xlarge
# Add a machine pool mp-1 with autoscaling enabled and 3 to 6 replicas of m7i.xlarge to a cluster
rosa create machinepool --cluster=mycluster --name=mp-1 --enable-autoscaling \
--min-replicas=3 --max-replicas=6 --instance-type=m7i.xlarge
# Add a machine pool with labels to a cluster
rosa create machinepool -c mycluster --name=mp-1 --replicas=2 --instance-type=r5.2xlarge --labels=foo=bar,bar=baz,
# Add a machine pool with spot instances to a cluster
rosa create machinepool -c mycluster --name=mp-1 --replicas=2 --instance-type=r5.2xlarge --use-spot-instances \
--spot-max-price=0.5
# Add a machine pool to a cluster and set the node drain grace period
rosa create machinepool -c mycluster --name=mp-1 --node-drain-grace-period="90 minutes"
7.2.1.15. rosa create network リンクのコピーリンクがクリップボードにコピーされました!
Network AWS cloudformation stack
Example usage
# Create a AWS cloudformation stack
rosa create network <template-name> --param Param1=Value1 --param Param2=Value2
# ROSA quick start HCP VPC example with one availability zone
rosa create network rosa-quickstart-default-vpc --param Region=us-west-2 --param Name=quickstart-stack --param AvailabilityZoneCount=1 --param VpcCidr=10.0.0.0/16
# ROSA quick start HCP VPC example with two explicit availability zones
rosa create network rosa-quickstart-default-vpc --param Region=us-west-2 --param Name=quickstart-stack --param AZ1=us-west-2b --param AZ2=us-west-2d --param VpcCidr=10.0.0.0/16
# To delete the AWS cloudformation stack
aws cloudformation delete-stack --stack-name <name> --region <region>
# TEMPLATE_NAME:
Specifies the name of the template to use. This should match the name of a directory
under the path specified by '--template-dir' or the 'OCM_TEMPLATE_DIR' environment variable.
The directory should contain a YAML file defining the custom template structure.
If no TEMPLATE_NAME is provided, or if no matching directory is found, the default
built-in template 'rosa-quickstart-default-vpc' will be used.
7.2.1.16. rosa create ocm-role リンクのコピーリンクがクリップボードにコピーされました!
Create role used by Red Hat Hybrid Cloud Console
Example usage
# Create default ocm-role for ROSA clusters using STS
rosa create ocm-role
# Create ocm-role with a specific permissions boundary
rosa create ocm-role --permissions-boundary arn:aws:iam::123456789012:policy/perm-boundary
7.2.1.17. rosa create oidc-config リンクのコピーリンクがクリップボードにコピーされました!
Create OpenID Connect (OIDC) config compliant with OIDC protocol.
Example usage
# Create OIDC config
rosa create oidc-config
7.2.1.18. rosa create oidc-provider リンクのコピーリンクがクリップボードにコピーされました!
Create OpenID Connect (OIDC) provider for an AWS Security Token Service (STS) cluster.
Example usage
# Create OIDC provider for cluster named "mycluster"
rosa create oidc-provider --cluster=mycluster
7.2.1.19. rosa create operator-roles リンクのコピーリンクがクリップボードにコピーされました!
Create Operator Identity and Access Management (IAM) roles for a cluster.
Example usage
# Create default operator roles for cluster named "mycluster"
rosa create operator-roles --cluster=mycluster
# Create operator roles with a specific permissions boundary
rosa create operator-roles -c mycluster --permissions-boundary arn:aws:iam::123456789012:policy/perm-boundary
7.2.1.20. rosa create tuning-configs リンクのコピーリンクがクリップボードにコピーされました!
Add tuning config
Example usage
# Add a tuning config with name "tuned1" and spec from a file "file1" to a cluster named "mycluster"
rosa create tuning-config --name=tuned1 --spec-path=file1 --cluster=mycluster"
7.2.1.21. rosa create user-role リンクのコピーリンクがクリップボードにコピーされました!
Create user role to verify account association
Example usage
# Create user roles
rosa create user-role
# Create user role with a specific permissions boundary
rosa create user-role --permissions-boundary arn:aws:iam::123456789012:policy/perm-boundary
7.2.1.22. rosa delete account-roles リンクのコピーリンクがクリップボードにコピーされました!
Delete account roles
Example usage
# Delete Account roles
rosa delete account-roles -p prefix
7.2.1.23. rosa delete admin リンクのコピーリンクがクリップボードにコピーされました!
Deletes the admin user
Example usage
# Delete the admin user
rosa delete admin --cluster=mycluster
7.2.1.24. rosa delete autoscaler リンクのコピーリンクがクリップボードにコピーされました!
Delete autoscaler for cluster
Example usage
# Delete the autoscaler config for cluster named "mycluster"
rosa delete autoscaler --cluster=mycluster
7.2.1.25. rosa delete cluster リンクのコピーリンクがクリップボードにコピーされました!
Delete cluster
Example usage
# Delete a cluster named "mycluster"
rosa delete cluster --cluster=mycluster
7.2.1.26. rosa delete dns-domain リンクのコピーリンクがクリップボードにコピーされました!
Delete DNS domain
Example usage
# Delete a DNS domain with ID github-1
rosa delete dns-domain github-1
7.2.1.27. rosa delete external-auth-provider リンクのコピーリンクがクリップボードにコピーされました!
Delete external authentication provider
Example usage
# Delete an external authentication provider named exauth-1
rosa delete external-auth-provider exauth-1 --cluster=mycluster
7.2.1.28. rosa delete iamserviceaccount リンクのコピーリンクがクリップボードにコピーされました!
Delete IAM role for Kubernetes service account
Example usage
# Delete IAM role for service account
rosa delete iamserviceaccount --cluster my-cluster \
--name my-app \
--namespace default
7.2.1.29. rosa delete idp リンクのコピーリンクがクリップボードにコピーされました!
Delete cluster identity providers (IDPs)
Example usage
# Delete an identity provider named github-1
rosa delete idp github-1 --cluster=mycluster
7.2.1.30. rosa delete image-mirror リンクのコピーリンクがクリップボードにコピーされました!
Delete image mirror from a cluster
Example usage
# Delete image mirror with ID "abc123" from cluster "mycluster"
rosa delete image-mirror --cluster=mycluster abc123
# Delete without confirmation prompt
rosa delete image-mirror --cluster=mycluster abc123 --yes
# Alternative: using the --id flag
rosa delete image-mirror --cluster=mycluster --id=abc123
7.2.1.31. rosa delete ingress リンクのコピーリンクがクリップボードにコピーされました!
Delete cluster ingress
Example usage
# Delete ingress with ID a1b2 from a cluster named 'mycluster'
rosa delete ingress --cluster=mycluster a1b2
# Delete secondary ingress using the sub-domain name
rosa delete ingress --cluster=mycluster apps2
7.2.1.32. rosa delete kubeletconfig リンクのコピーリンクがクリップボードにコピーされました!
Delete a kubeletconfig from a cluster
Example usage
# Delete the KubeletConfig for ROSA Classic cluster 'foo'
rosa delete kubeletconfig --cluster foo
# Delete the KubeletConfig named 'bar' from cluster 'foo'
rosa delete kubeletconfig --cluster foo --name bar
7.2.1.33. rosa delete log-forwarder リンクのコピーリンクがクリップボードにコピーされました!
Delete log forwarder
Example usage
# Delete log forwarder with ID 'example-id' from a cluster named 'mycluster-hcp'
rosa delete log-forwarder --cluster=mycluster-hcp example-id
7.2.1.34. rosa delete machinepool リンクのコピーリンクがクリップボードにコピーされました!
Delete machine pool
Example usage
# Delete machine pool with ID mp-1 from a cluster named 'mycluster'
rosa delete machinepool --cluster=mycluster mp-1
7.2.1.35. rosa delete ocm-role リンクのコピーリンクがクリップボードにコピーされました!
Delete the Red Hat Hybrid Cloud Console role
Example usage
# Delete OCM role
rosa delete ocm-role --role-arn arn:aws:iam::123456789012:role/xxx-OCM-Role-1223456778
7.2.1.36. rosa delete oidc-config リンクのコピーリンクがクリップボードにコピーされました!
Delete an OpenID Connect (OIDC) configuration
Example usage
# Delete OIDC config based on registered OIDC Config ID that has been supplied
rosa delete oidc-config --oidc-config-id <oidc_config_id>
7.2.1.37. rosa delete oidc-provider リンクのコピーリンクがクリップボードにコピーされました!
Delete OpenID Connect (OIDC) provider
Example usage
# Delete OIDC provider for cluster named "mycluster"
rosa delete oidc-provider --cluster=mycluster
7.2.1.38. rosa delete operator-roles リンクのコピーリンクがクリップボードにコピーされました!
Delete Operator Roles
Example usage
# Delete Operator roles for cluster named "mycluster"
rosa delete operator-roles --cluster=mycluster
7.2.1.39. rosa delete tuning-configs リンクのコピーリンクがクリップボードにコピーされました!
Delete tuning config
Example usage
# Delete tuning config with name tuned1 from a cluster named 'mycluster'
rosa delete tuning-config --cluster=mycluster tuned1
7.2.1.40. rosa delete user-role リンクのコピーリンクがクリップボードにコピーされました!
Delete user role
Example usage
# Delete user role
rosa delete user-role --role-arn {prefix}-User-{username}-Role
7.2.1.41. rosa describe access-request リンクのコピーリンクがクリップボードにコピーされました!
Show details of an Access Request
Example usage
# Describe an Access Request wit id <access_request_id>
rosa describe access-request --id <access_request_id>
7.2.1.42. rosa describe addon リンクのコピーリンクがクリップボードにコピーされました!
Show details of an add-on
Example usage
# Describe an add-on named "codeready-workspaces"
rosa describe addon codeready-workspaces
7.2.1.43. rosa describe addon-installation リンクのコピーリンクがクリップボードにコピーされました!
Show details of an add-on installation
Example usage
# Describe the 'bar' add-on installation on cluster 'foo'
rosa describe addon-installation --cluster foo --addon bar
7.2.1.44. rosa describe admin リンクのコピーリンクがクリップボードにコピーされました!
Show details of the cluster-admin user
Example usage
# Describe cluster-admin user of a cluster named mycluster
rosa describe admin -c mycluster
7.2.1.45. rosa describe autoscaler リンクのコピーリンクがクリップボードにコピーされました!
Show details of the autoscaler for a cluster
Example usage
# Describe the autoscaler for cluster 'foo'
rosa describe autoscaler --cluster foo
7.2.1.46. rosa describe break-glass-credential リンクのコピーリンクがクリップボードにコピーされました!
Show details of a break glass credential on a cluster
Example usage
# Show details of a break glass credential with ID "12345" on a cluster named "mycluster"
rosa describe break-glass-credential 12345 --cluster=mycluster
7.2.1.47. rosa describe cluster リンクのコピーリンクがクリップボードにコピーされました!
Show details of a cluster
Example usage
# Describe a cluster named "mycluster"
rosa describe cluster --cluster=mycluster
7.2.1.48. rosa describe external-auth-provider リンクのコピーリンクがクリップボードにコピーされました!
Show details of an external authentication provider on a cluster
Example usage
# Show details of an external authentication provider named "exauth" on a cluster named "mycluster"
rosa describe external-auth-provider exauth --cluster=mycluster
7.2.1.49. rosa describe iamserviceaccount リンクのコピーリンクがクリップボードにコピーされました!
Describe IAM role for Kubernetes service account
Example usage
# Describe IAM role for service account
rosa describe iamserviceaccount --cluster my-cluster \
--name my-app \
--namespace default
7.2.1.50. rosa describe ingress リンクのコピーリンクがクリップボードにコピーされました!
Show details of the specified ingress within cluster
Example usage
# Show details of the specified ingress within cluster
rosa describe ingress <ingress_id> -c mycluster
7.2.1.51. rosa describe kubeletconfig リンクのコピーリンクがクリップボードにコピーされました!
Show details of a kubeletconfig for a cluster
Example usage
# Describe the custom kubeletconfig for ROSA Classic cluster 'foo'
rosa describe kubeletconfig --cluster foo
# Describe the custom kubeletconfig named 'bar' for cluster 'foo'
rosa describe kubeletconfig --cluster foo --name bar
7.2.1.52. rosa describe log-forwarder リンクのコピーリンクがクリップボードにコピーされました!
Show details of a specific log forwarder used by a cluster
Example usage
# Show details of a specific log forwarder used by a cluster
rosa describe log-forwarder <log_fwd_id> -c mycluster-hcp
7.2.1.53. rosa describe machinepool リンクのコピーリンクがクリップボードにコピーされました!
Show details of a machine pool on a cluster
Example usage
# Show details of a machine pool named "mymachinepool" on a cluster named "mycluster"
rosa describe machinepool --cluster=mycluster --machinepool=mymachinepool
7.2.1.54. rosa describe tuning-configs リンクのコピーリンクがクリップボードにコピーされました!
Show details of tuning config
Example usage
# Describe the 'tuned1' tuned config on cluster 'foo'
rosa describe tuning-config --cluster foo tuned1
7.2.1.55. rosa describe upgrade リンクのコピーリンクがクリップボードにコピーされました!
Show details of an upgrade
Example usage
# Describe an upgrade-policy"
rosa describe upgrade
7.2.1.56. rosa download openshift-client リンクのコピーリンクがクリップボードにコピーされました!
Download OpenShift client tools
Example usage
# Download oc client tools
rosa download oc
7.2.1.57. rosa download rosa-client リンクのコピーリンクがクリップボードにコピーされました!
Download ROSA client tools
Example usage
# Download rosa client tools
rosa download rosa
7.2.1.58. rosa edit addon リンクのコピーリンクがクリップボードにコピーされました!
Edit add-on installation parameters on cluster
Example usage
# Edit the parameters of the Red Hat OpenShift logging operator add-on installation
rosa edit addon --cluster=mycluster cluster-logging-operator
7.2.1.59. rosa edit autoscaler リンクのコピーリンクがクリップボードにコピーされました!
Edit the autoscaler of a cluster
Example usage
# Interactively edit an autoscaler to a cluster named "mycluster"
rosa edit autoscaler --cluster=mycluster --interactive
# Edit a cluster-autoscaler to skip nodes with local storage
rosa edit autoscaler --cluster=mycluster --skip-nodes-with-local-storage
# Edit a cluster-autoscaler with log verbosity of '3'
rosa edit autoscaler --cluster=mycluster --log-verbosity 3
# Edit a cluster-autoscaler with total CPU constraints
rosa edit autoscaler --cluster=mycluster --min-cores 10 --max-cores 100
7.2.1.60. rosa edit cluster リンクのコピーリンクがクリップボードにコピーされました!
Edit cluster
Example usage
# Edit a cluster named "mycluster" to make it private
rosa edit cluster -c mycluster --private
# Edit all options interactively
rosa edit cluster -c mycluster --interactive
7.2.1.61. rosa edit image-mirror リンクのコピーリンクがクリップボードにコピーされました!
Edit image mirror for a cluster
Example usage
# Update mirrors for image mirror with ID "abc123" on cluster "mycluster"
rosa edit image-mirror --cluster=mycluster abc123 \
--mirrors=mirror.corp.com/team,backup.corp.com/team,new-mirror.corp.com/team
# Alternative: using the --id flag
rosa edit image-mirror --cluster=mycluster --id=abc123 \
--mirrors=mirror.corp.com/team,backup.corp.com/team,new-mirror.corp.com/team
7.2.1.62. rosa edit ingress リンクのコピーリンクがクリップボードにコピーされました!
Edit a cluster ingress (load balancer)
Example usage
# Make additional ingress with ID 'a1b2' private on a cluster named 'mycluster'
rosa edit ingress --private --cluster=mycluster a1b2
# Update the router selectors for the additional ingress with ID 'a1b2'
rosa edit ingress --label-match=foo=bar --cluster=mycluster a1b2
# Update the default ingress using the sub-domain identifier
rosa edit ingress --private=false --cluster=mycluster apps
# Update the load balancer type of the apps2 ingress
rosa edit ingress --lb-type=nlb --cluster=mycluster apps2
7.2.1.63. rosa edit kubeletconfig リンクのコピーリンクがクリップボードにコピーされました!
Edit a kubeletconfig for a cluster
Example usage
# Edit a KubeletConfig to have a pod-pids-limit of 10000
rosa edit kubeletconfig --cluster=mycluster --pod-pids-limit=10000
# Edit a KubeletConfig named 'bar' to have a pod-pids-limit of 10000
rosa edit kubeletconfig --cluster=mycluster --name=bar --pod-pids-limit=10000
7.2.1.64. rosa edit machinepool リンクのコピーリンクがクリップボードにコピーされました!
Edit machine pool
Example usage
# Set 4 replicas on machine pool 'mp1' on cluster 'mycluster'
rosa edit machinepool --replicas=4 --cluster=mycluster mp1
# Enable autoscaling and Set 3-5 replicas on machine pool 'mp1' on cluster 'mycluster'
rosa edit machinepool --enable-autoscaling --min-replicas=3 --max-replicas=5 --cluster=mycluster mp1
# Set the node drain grace period to 1 hour on machine pool 'mp1' on cluster 'mycluster'
rosa edit machinepool --node-drain-grace-period="1 hour" --cluster=mycluster mp1
7.2.1.65. rosa edit tuning-configs リンクのコピーリンクがクリップボードにコピーされました!
Edit tuning config
Example usage
# Update the tuning config with name 'tuning-1' with the spec defined in file1
rosa edit tuning-config --cluster=mycluster tuning-1 --spec-path file1
7.2.1.66. rosa grant user リンクのコピーリンクがクリップボードにコピーされました!
Grant user access to cluster
Example usage
# Add cluster-admin role to a user
rosa grant user cluster-admin --user=myusername --cluster=mycluster
# Grant dedicated-admins role to a user
rosa grant user dedicated-admin --user=myusername --cluster=mycluster
7.2.1.67. rosa init リンクのコピーリンクがクリップボードにコピーされました!
Applies templates to support Red Hat OpenShift Service on AWS
Example usage
# Configure your AWS account to allow IAM (non-STS) ROSA clusters
rosa init
# Configure a new AWS account using pre-existing OCM credentials
rosa init --token=$OFFLINE_ACCESS_TOKEN
7.2.1.68. rosa install addon リンクのコピーリンクがクリップボードにコピーされました!
Install add-ons on cluster
Example usage
# Add the CodeReady Workspaces add-on installation to the cluster
rosa install addon --cluster=mycluster codeready-workspaces
7.2.1.69. rosa link ocm-role リンクのコピーリンクがクリップボードにコピーされました!
Link OCM role to specific OCM organization.
Example usage
# Link OCM role
rosa link ocm-role --role-arn arn:aws:iam::123456789012:role/ManagedOpenshift-OCM-Role
7.2.1.70. rosa link user-role リンクのコピーリンクがクリップボードにコピーされました!
Link user role to specific OCM account.
Example usage
# Link user roles
rosa link user-role --role-arn arn:aws:iam::{accountid}:role/{prefix}-User-{username}-Role
7.2.1.71. rosa list access-request リンクのコピーリンクがクリップボードにコピーされました!
List Access Requests
Example usage
# List all Access Requests for cluster 'foo'
rosa list access-request --cluster foo
7.2.1.72. rosa list account-roles リンクのコピーリンクがクリップボードにコピーされました!
List account roles and policies
Example usage
# List all account roles
rosa list account-roles
7.2.1.73. rosa list addons リンクのコピーリンクがクリップボードにコピーされました!
List add-on installations
Example usage
# List all add-on installations on a cluster named "mycluster"
rosa list addons --cluster=mycluster
7.2.1.74. rosa list break-glass-credentials リンクのコピーリンクがクリップボードにコピーされました!
List break glass credential
Example usage
# List all break glass credentials for a cluster named 'mycluster'"
rosa list break-glass-credentials -c mycluster
7.2.1.75. rosa list clusters リンクのコピーリンクがクリップボードにコピーされました!
List clusters
Example usage
# List all clusters
rosa list clusters
7.2.1.76. rosa list dns-domain リンクのコピーリンクがクリップボードにコピーされました!
List DNS Domains
Example usage
# List all DNS Domains tied to your organization ID"
rosa list dns-domain
7.2.1.77. rosa list external-auth-providers リンクのコピーリンクがクリップボードにコピーされました!
List external authentication provider
Example usage
# List all external authentication providers for a cluster named 'mycluster'"
rosa list external-auth-provider -c mycluster
7.2.1.78. rosa list gates リンクのコピーリンクがクリップボードにコピーされました!
List available OCP Gates
Example usage
# List all OCP gates for OCP version
rosa list gates --version 4.9
# List all STS gates for OCP version
rosa list gates --gate sts --version 4.9
# List all OCP gates for OCP version
rosa list gates --gate ocp --version 4.9
# List available gates for cluster upgrade version
rosa list gates -c <cluster_id> --version 4.9.15
7.2.1.79. rosa list iamserviceaccounts リンクのコピーリンクがクリップボードにコピーされました!
List IAM roles for Kubernetes service accounts
Example usage
# List IAM roles for service accounts
rosa list iamserviceaccounts --cluster my-cluster
7.2.1.80. rosa list idps リンクのコピーリンクがクリップボードにコピーされました!
List cluster identity providers (IDPs)
Example usage
# List all identity providers on a cluster named "mycluster"
rosa list idps --cluster=mycluster
7.2.1.81. rosa list image-mirrors リンクのコピーリンクがクリップボードにコピーされました!
List cluster image mirrors
Example usage
# List all image mirrors on a cluster named "mycluster"
rosa list image-mirrors --cluster=mycluster
7.2.1.82. rosa list ingresses リンクのコピーリンクがクリップボードにコピーされました!
List cluster ingresses
Example usage
# List all routes on a cluster named "mycluster"
rosa list ingresses --cluster=mycluster
7.2.1.83. rosa list instance-types リンクのコピーリンクがクリップボードにコピーされました!
List Instance types
Example usage
# List all instance types
rosa list instance-types
7.2.1.84. rosa list kubeletconfigs リンクのコピーリンクがクリップボードにコピーされました!
List kubeletconfigs
Example usage
# List the kubeletconfigs for cluster 'foo'
rosa list kubeletconfig --cluster foo
7.2.1.85. rosa list log-forwarders リンクのコピーリンクがクリップボードにコピーされました!
List cluster log forwarders
Example usage
# List all log forwarders on a cluster named "mycluster":
rosa list log-forwarders --cluster=mycluster
7.2.1.86. rosa list machinepools リンクのコピーリンクがクリップボードにコピーされました!
List cluster machine pools
Example usage
# List all machine pools on a cluster named "mycluster"
rosa list machinepools --cluster=mycluster
# List machine pools showing all information
rosa list machinepools --cluster=mycluster --all
7.2.1.87. rosa list ocm-roles リンクのコピーリンクがクリップボードにコピーされました!
List the OCM roles
Example usage
# List all ocm roles
rosa list ocm-roles
7.2.1.88. rosa list oidc-config リンクのコピーリンクがクリップボードにコピーされました!
List OIDC Configuration resources
Example usage
# List all OIDC Configurations tied to your organization ID"
rosa list oidc-config
7.2.1.89. rosa list oidc-providers リンクのコピーリンクがクリップボードにコピーされました!
List OpenID Connect (OIDC) providers
Example usage
# List all oidc providers
rosa list oidc-providers
7.2.1.90. rosa list operator-roles リンクのコピーリンクがクリップボードにコピーされました!
List operator roles and policies
Example usage
# List all operator roles
rosa list operator-roles
7.2.1.91. rosa list regions リンクのコピーリンクがクリップボードにコピーされました!
List available regions
Example usage
# List all available regions
rosa list regions
7.2.1.92. rosa list tuning-configs リンクのコピーリンクがクリップボードにコピーされました!
List tuning configs
Example usage
# List all tuning configuration for a cluster named 'mycluster'"
rosa list tuning-configs -c mycluster
7.2.1.93. rosa list user-roles リンクのコピーリンクがクリップボードにコピーされました!
List user roles
Example usage
# List all user roles
rosa list user-roles
7.2.1.94. rosa list users リンクのコピーリンクがクリップボードにコピーされました!
List cluster users
Example usage
# List all users on a cluster named "mycluster"
rosa list users --cluster=mycluster
7.2.1.95. rosa list versions リンクのコピーリンクがクリップボードにコピーされました!
List available versions
Example usage
# List all OpenShift versions
rosa list versions
7.2.1.96. rosa login リンクのコピーリンクがクリップボードにコピーされました!
Log in to your Red Hat account
Example usage
# Login to the OpenShift API with an existing token generated from https://console.redhat.com/openshift/token/rosa
rosa login --token=$OFFLINE_ACCESS_TOKEN
7.2.1.97. rosa logs リンクのコピーリンクがクリップボードにコピーされました!
Show installation or uninstallation logs for a cluster
Example usage
# Show install logs for a cluster named 'mycluster'
rosa logs install --cluster=mycluster
# Show uninstall logs for a cluster named 'mycluster'
rosa logs uninstall --cluster=mycluster
7.2.1.98. rosa logs install リンクのコピーリンクがクリップボードにコピーされました!
Show cluster installation logs
Example usage
# Show last 100 install log lines for a cluster named "mycluster"
rosa logs install mycluster --tail=100
# Show install logs for a cluster using the --cluster flag
rosa logs install --cluster=mycluster
7.2.1.99. rosa logs uninstall リンクのコピーリンクがクリップボードにコピーされました!
Show cluster uninstallation logs
Example usage
# Show last 100 uninstall log lines for a cluster named "mycluster"
rosa logs uninstall mycluster --tail=100
# Show uninstall logs for a cluster using the --cluster flag
rosa logs uninstall --cluster=mycluster
7.2.1.100. rosa register oidc-config リンクのコピーリンクがクリップボードにコピーされました!
Registers unmanaged OIDC config with Openshift Clusters Manager.
Example usage
# Register OIDC config
rosa register oidc-config
7.2.1.101. rosa revoke break-glass-credentials リンクのコピーリンクがクリップボードにコピーされました!
Revoke break glass credentials
Example usage
# Revoke all break glass credentials
rosa revoke break-glass-credentials --cluster=mycluster
7.2.1.102. rosa revoke user リンクのコピーリンクがクリップボードにコピーされました!
Revoke role from users
Example usage
# Revoke cluster-admin role from a user
rosa revoke user cluster-admins --user=myusername --cluster=mycluster
# Revoke dedicated-admin role from a user
rosa revoke user dedicated-admins --user=myusername --cluster=mycluster
7.2.1.103. rosa uninstall addon リンクのコピーリンクがクリップボードにコピーされました!
Uninstall add-on from cluster
Example usage
# Remove the CodeReady Workspaces add-on installation from the cluster
rosa uninstall addon --cluster=mycluster codeready-workspaces
7.2.1.104. rosa unlink ocm-role リンクのコピーリンクがクリップボードにコピーされました!
Unlink the OCM role from a specific OCM organization
Example usage
# Unlink ocm role
rosa unlink ocm-role --role-arn arn:aws:iam::123456789012:role/ManagedOpenshift-OCM-Role
7.2.1.105. rosa unlink user-role リンクのコピーリンクがクリップボードにコピーされました!
Unlink the user role from a specific OCM account
Example usage
# Unlink user role
rosa unlink user-role --role-arn arn:aws:iam::{accountid}:role/{prefix}-User-{username}-Role
7.2.1.106. rosa upgrade account-roles リンクのコピーリンクがクリップボードにコピーされました!
Upgrade account-wide IAM roles to the latest version.
Example usage
# Upgrade account roles for ROSA STS clusters
rosa upgrade account-roles
7.2.1.107. rosa upgrade cluster リンクのコピーリンクがクリップボードにコピーされました!
Upgrade cluster
Example usage
# Interactively schedule an upgrade on the cluster named "mycluster"
rosa upgrade cluster --cluster=mycluster --interactive
# Schedule a cluster upgrade within the hour
rosa upgrade cluster -c mycluster --version 4.12.20
# Check if any gates need to be acknowledged prior to attempting an upgrade
rosa upgrade cluster -c mycluster --version 4.12.20 --dry-run
7.2.1.108. rosa upgrade machinepool リンクのコピーリンクがクリップボードにコピーされました!
Upgrade machinepool
Example usage
# Interactively schedule an upgrade on the cluster named "mycluster"" for a machinepool named "np1"
rosa upgrade machinepool np1 --cluster=mycluster --interactive
# Schedule a machinepool upgrade within the hour
rosa upgrade machinepool np1 -c mycluster --version 4.12.20
7.2.1.109. rosa upgrade operator-roles リンクのコピーリンクがクリップボードにコピーされました!
Upgrade operator IAM roles for a cluster.
Example usage
# Upgrade cluster-specific operator IAM roles
rosa upgrade operators-roles
7.2.1.110. rosa upgrade roles リンクのコピーリンクがクリップボードにコピーされました!
Upgrade cluster-specific IAM roles to the latest version.
Example usage
# Upgrade cluster roles for ROSA STS clusters
rosa upgrade roles -c <cluster_key>
7.2.1.111. rosa verify network リンクのコピーリンクがクリップボードにコピーされました!
Verify Virtual Private Cloud (VPC) subnets are configured correctly
Example usage
# Verify two subnets
rosa verify network --subnet-ids subnet-03046a9b92b5014fb,subnet-03046a9c92b5014fb
7.2.1.112. rosa verify openshift-client リンクのコピーリンクがクリップボードにコピーされました!
Verify OpenShift client tools
Example usage
# Verify oc client tools
rosa verify oc
7.2.1.113. rosa verify permissions リンクのコピーリンクがクリップボードにコピーされました!
Verify AWS permissions are ok for non-AWS Security Token Service (STS) cluster install
Example usage
# Verify AWS permissions are configured correctly
rosa verify permissions
# Verify AWS permissions in a different region
rosa verify permissions --region=us-west-2
7.2.1.114. rosa verify quota リンクのコピーリンクがクリップボードにコピーされました!
Verify AWS quota is ok for cluster install
Example usage
# Verify AWS quotas are configured correctly
rosa verify quota
# Verify AWS quotas in a different region
rosa verify quota --region=us-west-2
7.2.1.115. rosa verify rosa-client リンクのコピーリンクがクリップボードにコピーされました!
Verify ROSA client tools
Example usage
# Verify rosa client tools
rosa verify rosa
7.2.1.116. rosa whoami リンクのコピーリンクがクリップボードにコピーされました!
Displays user account information
Example usage
# Displays user information
rosa whoami
7.3. Least privilege permissions for rosa CLI commands リンクのコピーリンクがクリップボードにコピーされました!
Create AWS Identity and Access Management (IAM) roles that grant only the rights each user needs for ROSA command-line interface (CLI) (rosa) tasks. The following examples use least privilege with the rosa CLI.
Although these policies and commands work together, other restrictions in your AWS environment might make these policies insufficient for your specific needs. Red Hat provides these examples as a baseline, assuming no other AWS Identity and Access Management (IAM) restrictions are present.
7.3.1. Least privilege permissions for common ROSA CLI commands リンクのコピーリンクがクリップボードにコピーされました!
These examples list the least privilege IAM permissions for common ROSA command-line interface (CLI) (rosa) commands when you build Red Hat OpenShift Service on AWS clusters.
7.3.1.1. Create a managed OpenID Connect (OIDC) provider リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to create your managed OIDC provider by using auto mode.
Input
$ rosa create oidc-config --mode auto
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CreateOidcConfig",
"Effect": "Allow",
"Action": [
"iam:TagOpenIDConnectProvider",
"iam:CreateOpenIDConnectProvider"
],
"Resource": "*"
}
]
}
7.3.1.2. Create an unmanaged OpenID Connect provider リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to create your unmanaged OIDC provider by using auto mode.
Input
$ rosa create oidc-config --mode auto --managed=false
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:TagOpenIDConnectProvider",
"iam:ListRoleTags",
"iam:ListRoles",
"iam:CreateOpenIDConnectProvider",
"s3:CreateBucket",
"s3:PutObject",
"s3:PutBucketTagging",
"s3:PutBucketPolicy",
"s3:PutObjectTagging",
"s3:PutBucketPublicAccessBlock",
"secretsmanager:CreateSecret",
"secretsmanager:TagResource"
],
"Resource": "*"
}
]
}
7.3.1.3. List your account roles リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to list your account roles.
Input
$ rosa list account-roles
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListAccountRoles",
"Effect": "Allow",
"Action": [
"iam:ListRoleTags",
"iam:ListRoles"
],
"Resource": "*"
}
]
}
7.3.1.4. List your Operator roles リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to list your Operator roles.
Input
$ rosa list operator-roles
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListOperatorRoles",
"Effect": "Allow",
"Action": [
"iam:ListRoleTags",
"iam:ListAttachedRolePolicies",
"iam:ListRoles",
"iam:ListPolicyTags"
],
"Resource": "*"
}
]
}
7.3.1.5. List your OIDC providers リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to list your OIDC providers.
Input
$ rosa list oidc-providers
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListOidcProviders",
"Effect": "Allow",
"Action": [
"iam:ListOpenIDConnectProviders",
"iam:ListOpenIDConnectProviderTags"
],
"Resource": "*"
}
]
}
7.3.1.6. Verify your quota リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to verify your quota.
Input
$ rosa verify quota
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VerifyQuota",
"Effect": "Allow",
"Action": [
"elasticloadbalancing:DescribeAccountLimits",
"servicequotas:ListServiceQuotas"
],
"Resource": "*"
}
]
}
7.3.1.7. Delete your managed OIDC configuration リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to delete your managed OIDC configuration by using auto mode.
Input
$ rosa delete oidc-config -–mode auto
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DeleteOidcConfig",
"Effect": "Allow",
"Action": [
"iam:ListOpenIDConnectProviders",
"iam:DeleteOpenIDConnectProvider"
],
"Resource": "*"
}
]
}
7.3.1.8. Delete your unmanaged OIDC configuration リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to delete your unmanaged OIDC configuration by using auto mode.
Input
$ rosa delete oidc-config -–mode auto
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:ListOpenIDConnectProviders",
"iam:DeleteOpenIDConnectProvider",
"secretsmanager:DeleteSecret",
"s3:ListBucket",
"s3:DeleteObject",
"s3:DeleteBucket"
],
"Resource": "*"
}
]
}
7.3.1.9. Create a cluster リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to create Red Hat OpenShift Service on AWS clusters.
Input
$ rosa create cluster --hosted-cp
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CreateCluster",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:ListRoleTags",
"iam:ListAttachedRolePolicies",
"iam:ListRoles",
"ec2:DescribeSubnets",
"ec2:DescribeRouteTables",
"ec2:DescribeAvailabilityZones"
],
"Resource": "*"
}
]
}
7.3.1.10. Create your account roles and Operator roles リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to create account and Operator roles by using auto mode.
Input
$ rosa create account-roles --mode auto --hosted-cp
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CreateAccountRoles",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:UpdateAssumeRolePolicy",
"iam:ListRoleTags",
"iam:GetPolicy",
"iam:TagRole",
"iam:ListRoles",
"iam:CreateRole",
"iam:AttachRolePolicy",
"iam:ListPolicyTags"
],
"Resource": "*"
}
]
}
7.3.1.11. Delete your account roles リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to delete the account roles in auto mode.
Input
$ rosa delete account-roles -–mode auto
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DeleteAccountRoles",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:ListInstanceProfilesForRole",
"iam:DetachRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:ListRoles",
"iam:DeleteRole",
"iam:ListRolePolicies"
],
"Resource": "*"
}
]
}
7.3.1.12. Delete your Operator roles リンクのコピーリンクがクリップボードにコピーされました!
Run the following command with the specified permissions to delete your Operator roles in auto mode.
Input
$ rosa delete operator-roles -–mode auto
Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DeleteOperatorRoles",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:DetachRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:ListRoles",
"iam:DeleteRole"
],
"Resource": "*"
}
]
}
7.3.2. ROSA CLI commands with no required permissions リンクのコピーリンクがクリップボードにコピーされました!
These ROSA command-line interface (CLI) (rosa) commands do not need the Identity and Access Management (IAM) policies. They need an access key, a secret key, or an attached role.
| Command | Input |
|---|---|
| list cluster |
|
| list versions |
|
| describe cluster |
|
| create admin |
|
| list users |
|
| list upgrades |
|
| list OIDC configuration |
|
| list identity providers |
|
| list ingresses |
|
7.4. Manage billing accounts for Red Hat OpenShift Service on AWS clusters リンクのコピーリンクがクリップボードにコピーされました!
You can use the ROSA command-line interface (CLI) (rosa) to point an existing cluster at a different AWS billing account after deployment. You can correct a billing account linked at install time or change the account at a later date.
You also have the option to update your billing account through the OpenShift Cluster Manager.
7.4.1. Update billing accounts for Red Hat OpenShift Service on AWS clusters リンクのコピーリンクがクリップボードにコピーされました!
Change the AWS billing account a deployed cluster uses by running rosa edit cluster in interactive mode.
Prerequisites
- You must have more than one AWS billing account.
- You must link the AWS billing account to the same Red Hat organization where you deployed the cluster.
Procedure
Run the following command in your terminal window. Replace
<cluster_ID>with the ID of the cluster whose billing account you want to update.$ rosa edit cluster -c <cluster_ID>NoteTo locate the IDs of your active clusters, run the
$ rosa list clusterscommand in your terminal window.-
Skip to the
Billing Accountparameter within the interactive mode. Select the required AWS billing account from the list of available options and press Enter.
The AWS billing account for your cluster is now updated.