mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
501 lines
13 KiB
Plaintext
501 lines
13 KiB
Plaintext
|
|
// Module included in the following assemblies:
|
|
//
|
|
// * cli_reference/rosa_cli/rosa-manage-objects-cli.adoc
|
|
|
|
[id="rosa-create-objects_{context}"]
|
|
= Create objects
|
|
|
|
|
|
This section describes the `create` commands for clusters and resources.
|
|
|
|
[id="rosa-create-admin_{context}"]
|
|
== create admin
|
|
|
|
Create a cluster administrator with an automatically generated password that can log in to a cluster.
|
|
|
|
.Syntax
|
|
[source,terminal]
|
|
----
|
|
$ rosa create admin --cluster=<cluster_name> | <cluster_id>
|
|
----
|
|
|
|
.Arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--cluster
|
|
|Required: The name or ID (string) of the cluster to add to the identity provider (IDP).
|
|
|===
|
|
|
|
.Optional arguments inherited from parent commands
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--help
|
|
|Shows help for this command.
|
|
|
|
|--debug
|
|
|Enables debug mode.
|
|
|
|
|--interactive
|
|
|Enables interactive mode.
|
|
|
|
|--profile
|
|
|Specifies an AWS profile (string) from your credentials file.
|
|
|
|
|--v <level>
|
|
|The log level for V logs.
|
|
|===
|
|
|
|
.Example
|
|
Create a cluster administrator that can log in to a cluster named `mycluster`:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create admin --cluster=mycluster
|
|
----
|
|
|
|
[id="rosa-create-cluster-command_{context}"]
|
|
== create cluster
|
|
|
|
Create a new cluster.
|
|
|
|
.Syntax
|
|
[source,terminal]
|
|
----
|
|
$ rosa create cluster --cluster=<cluster_name> | <cluster_id> [arguments]
|
|
----
|
|
|
|
.Arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--cluster
|
|
|Required: The name or ID (string) of the cluster. When used with the `create cluster` command, this argument is used to generate a sub-domain for your cluster on `openshiftapps.com`.
|
|
|
|
|--channel-group
|
|
|The channel group (string) is the name of the group where this image belongs, for example `stable` or `fast`. Default: `stable`
|
|
|
|
|--compute-machine-type
|
|
|The instance type (string) for the compute nodes. Determines the amount of memory and vCPU that are allocated to each compute node.
|
|
|
|
|--compute-nodes
|
|
|The number (integer) of worker nodes to provision per zone. Single-zone clusters require at least 2 nodes. Multi-zone clusters require at least 3 nodes. Default: `2` for single-az; `3` for multi-az
|
|
|
|
|--disable-scp-checks
|
|
|Indicates whether cloud permission checks are disabled when attempting to install a cluster.
|
|
|
|
|--dry-run
|
|
|Simulates creating the cluster.
|
|
|
|
|--enable-autoscaling
|
|
|Enables autoscaling of compute nodes. By default, autoscaling is set to `2` nodes. To set non-default node limits, use this argument with the `--min-replicas` and `--max-replicas` arguments.
|
|
|
|
|--host-prefix
|
|
|The subnet prefix length (integer) to assign to each individual node. For example, if host prefix is set to `23`, then each node is assigned a `/23` subnet out of the given CIDR.
|
|
|
|
|--machine-cidr
|
|
|Block of IP addresses (ipNet) used by OpenShift Container Platform while installing the cluster. Example: `10.0.0.0/16`
|
|
|
|
|--max-replicas
|
|
|Specifies the maximum number of compute nodes when enabling autoscaling. Default: `2`
|
|
|
|
|--min-replicas
|
|
|Specifies the minimum number of compute nodes when enabling autoscaling. Default: `2`
|
|
|
|
|--multi-az
|
|
|Deploys to multiple data centers.
|
|
|
|
|--pod-cidr
|
|
|Block of IP addresses (ipNet) from which pod IP addresses are allocated. Example: `10.128.0.0/14`
|
|
|
|
|--private
|
|
|Restricts master API endpoint and application routes to direct, private connectivity.
|
|
|
|
|--private-link
|
|
| Specifies to use AWS PrivateLink to provide private connectivity between VPCs and services. The `--subnet-ids` argument is required when using `--private-link`.
|
|
|
|
|--region
|
|
|The AWS region (string) where your worker pool will be located. This argument overrides the `AWS_REGION` environment variable.
|
|
|
|
|--service-cidr
|
|
|Block of IP addresses (ipNet) for services. Example: `172.30.0.0/16`
|
|
|
|
|--subnet-ids
|
|
|The subnet IDs (string) to use when installing the cluster. Subnet IDs must be in pairs with one private subnet ID and one public subnet ID per availability zone. Subnets are comma-delimited. Example: `--subnet-ids=subnet-1,subnet-2`. Leave the value empty for installer-provisioned subnet IDs.
|
|
|
|
|
|
When using `--private-link`, the `--subnet-ids` argument is required and only one private subnet is allowed per zone.
|
|
|
|
|--version
|
|
|The version (string) of OpenShift Container Platform that will be used to install the cluster. Example: `4.3.10`
|
|
|===
|
|
|
|
.Optional arguments inherited from parent commands
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--help
|
|
|Shows help for this command.
|
|
|
|
|--debug
|
|
|Enables debug mode.
|
|
|
|
|--interactive
|
|
|Enables interactive mode.
|
|
|
|
|--profile
|
|
|Specifies an AWS profile (string) from your credentials file.
|
|
|
|
|--v <level>
|
|
|The log level for V logs.
|
|
|===
|
|
|
|
.Examples
|
|
Create a cluster named `mycluster`:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create cluster --cluster=mycluster
|
|
----
|
|
|
|
Create a cluster with a specific AWS region:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create cluster --cluster=mycluster --region=us-east-2
|
|
----
|
|
|
|
Create a cluster with autoscaling enabled on the default worker machine pool:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create cluster --cluster=mycluster -region=us-east-1 --enable-autoscaling --min-replicas=2 --max-replicas=5
|
|
----
|
|
|
|
[id="rosa-create-idp_{context}"]
|
|
== create idp
|
|
|
|
Add an identity provider (IDP) to define how users log in to a cluster.
|
|
|
|
.Syntax
|
|
[source,terminal]
|
|
----
|
|
$ rosa create idp --cluster=<cluster_name> | <cluster_id> [arguments]
|
|
----
|
|
|
|
.Arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--cluster
|
|
|Required: The name or ID (string) of the cluster to which the IDP will be added.
|
|
|
|
|--ca
|
|
|The path (string) to the PEM-encoded certificate file to use when making requests to the server.
|
|
|
|
|--client-id
|
|
|The client ID (string) from the registered application.
|
|
|
|
|--client-secret
|
|
|The client secret (string) from the registered application.
|
|
|
|
|--mapping-method
|
|
|Specifies how new identities (string) are mapped to users when they log in. Default: `claim`
|
|
|
|
|--name
|
|
|The name (string) for the identity provider.
|
|
|
|
|--type
|
|
|The type (string) of identity provider. Options: `github`, `gitlab`, `google`, `ldap`, `openid`
|
|
|===
|
|
|
|
.GitHub arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--hostname
|
|
|The optional domain (string) to use with a hosted instance of GitHub Enterprise.
|
|
|
|
|--organizations
|
|
|Specifies the organizations for login access. Only users that are members of at least one of the listed organizations (string) are allowed to log in.
|
|
|
|
|--teams
|
|
|Specifies the teams for login access. Only users that are members of at least one of the listed teams (string) are allowed to log in. The format is `<org>/<team>`.
|
|
|===
|
|
|
|
.GitLab arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--host-url
|
|
|The host URL (string) of a GitLab provider. Default: `https://gitlab.com`
|
|
|===
|
|
|
|
.Google arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--hosted-domain
|
|
|Restricts users to a Google Apps domain (string).
|
|
|===
|
|
|
|
.LDAP arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--bind-dn
|
|
|The domain name (string) to bind with during the search phase.
|
|
|
|
|--bind-password
|
|
|The password (string) to bind with during the search phase.
|
|
|
|
|--email-attributes
|
|
|The list (string) of attributes whose values should be used as the email address.
|
|
|
|
|--id-attributes
|
|
|The list (string) of attributes whose values should be used as the user ID. Default: `dn`
|
|
|
|
|--insecure
|
|
|Does not make TLS connections to the server.
|
|
|
|
|--name-attributes
|
|
|The list (string) of attributes whose values should be used as the display name. Default: `cn`
|
|
|
|
|--url
|
|
|An RFC 2255 URL (string) which specifies the LDAP search parameters to use.
|
|
|
|
|--username-attributes
|
|
|The list (string) of attributes whose values should be used as the preferred username. Default: `uid`
|
|
|===
|
|
|
|
.OpenID arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--email-claims
|
|
|The list (string) of claims to use as the email address.
|
|
|
|
|--extra-scopes
|
|
|The list (string) of scopes to request, in addition to the `openid` scope, during the authorization token request.
|
|
|
|
|--issuer-url
|
|
|The URL (string) that the OpenID provider asserts as the issuer identifier. It must use the HTTPS scheme with no URL query parameters or fragment.
|
|
|
|
|--name-claims
|
|
|The list (string) of claims to use as the display name.
|
|
|
|
|--username-claims
|
|
|The list (string) of claims to use as the preferred username when provisioning a user.
|
|
|===
|
|
|
|
.Optional arguments inherited from parent commands
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--help
|
|
|Shows help for this command.
|
|
|
|
|--debug
|
|
|Enables debug mode.
|
|
|
|
|--interactive
|
|
|Enables interactive mode.
|
|
|
|
|--profile
|
|
|Specifies an AWS profile (string) from your credentials file.
|
|
|
|
|--v <level>
|
|
|The log level for V logs.
|
|
|===
|
|
|
|
.Examples
|
|
Add a GitHub identity provider to a cluster named `mycluster`:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create idp --type=github --cluster=mycluster
|
|
----
|
|
|
|
Add an identity provider following interactive prompts:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create idp --cluster=mycluster --interactive
|
|
----
|
|
|
|
[id="rosa-create-ingress_{context}"]
|
|
== create ingress
|
|
|
|
Add an ingress endpoint to enable API access to the cluster.
|
|
|
|
.Syntax
|
|
[source,terminal]
|
|
----
|
|
$ rosa create ingress --cluster=<cluster_name> | <cluster_id> [arguments]
|
|
----
|
|
|
|
.Arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--cluster
|
|
|Required: The name or ID (string) of the cluster to which the ingress will be added.
|
|
|
|
|--label-match
|
|
|The label match (string) for ingress. The format must be a comma-delimited list of key=value pairs. If no label is specified, all routes are exposed on both routers.
|
|
|
|
|--private
|
|
|Restricts application route to direct, private connectivity.
|
|
|===
|
|
|
|
.Optional arguments inherited from parent commands
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--help
|
|
|Shows help for this command.
|
|
|
|
|--debug
|
|
|Enables debug mode.
|
|
|
|
|--interactive
|
|
|Enables interactive mode.
|
|
|
|
|--profile
|
|
|Specifies an AWS profile (string) from your credentials file.
|
|
|
|
|--v <level>
|
|
|The log level for V logs.
|
|
|===
|
|
|
|
.Examples
|
|
Add an internal ingress to a cluster named `mycluster`:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create ingress --private --cluster=mycluster
|
|
----
|
|
|
|
Add a public ingress to a cluster named `mycluster`:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create ingress --cluster=mycluster
|
|
----
|
|
|
|
Add an ingress with a route selector label match:s
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create ingress --cluster=mycluster --label-match=foo=bar,bar=baz
|
|
----
|
|
|
|
[id="rosa-create-machinepool_{context}"]
|
|
== create machinepool
|
|
|
|
Add a machine pool to an existing cluster.
|
|
|
|
.Syntax
|
|
[source,terminal]
|
|
----
|
|
$ rosa create machinepool --cluster=<cluster_name> | <cluster_id> --replicas=<number> --name=<machinepool_name> [arguments]
|
|
----
|
|
|
|
.Arguments
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--cluster
|
|
|Required: The name or ID (string) of the cluster to which the machine pool will be added.
|
|
|
|
|--enable-autoscaling
|
|
|Enable or disable autoscaling of compute nodes. To enable autoscaling, use this argument with the `--min-replicas` and `--max-replicas` arguments. To disable autoscaling, use `--enable-autoscaling=false` with the `--replicas` argument.
|
|
|
|
|--instance-type
|
|
|The instance type (string) that should be used. Default: `m5.xlarge`
|
|
|
|
|--labels
|
|
|The labels (string) for the machine pool. The format must be a comma-delimited list of key=value pairs. This list overwrites any modifications made to node labels on an ongoing basis.
|
|
|
|
|--max-replicas
|
|
|Specifies the maximum number of compute nodes when enabling autoscaling.
|
|
|
|
|--min-replicas
|
|
|Specifies the minimum number of compute nodes when enabling autoscaling.
|
|
|
|
|--name
|
|
|Required: The name (string) for the machine pool.
|
|
|
|
|--replicas
|
|
|Required when autoscaling is not configured. The number (integer) of machines for this machine pool.
|
|
|
|
|--taints
|
|
|Taints for the machine pool. This string value should be formatted as a comma-separated list of `key=value:ScheduleType`. This list will overwrite any modifications made to Node taints on an ongoing basis.
|
|
|===
|
|
|
|
.Optional arguments inherited from parent commands
|
|
[cols="30,70"]
|
|
|===
|
|
|Option |Definition
|
|
|
|
|--help
|
|
|Shows help for this command.
|
|
|
|
|--debug
|
|
|Enables debug mode.
|
|
|
|
|--interactive
|
|
|Enables interactive mode.
|
|
|
|
|--profile
|
|
|Specifies an AWS profile (string) from your credentials file.
|
|
|
|
|--v <level>
|
|
|The log level for V logs.
|
|
|===
|
|
|
|
.Examples
|
|
Interactively add a machine pool to a cluster named `mycluster`:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create machinepool --cluster=mycluster --interactive
|
|
----
|
|
|
|
Add a machine pool that is named `mp-1` to a cluster with autoscaling enabled:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create machinepool --cluster=mycluster --enable-autoscaling --min-replicas=2 --max-replicas=5 --name=mp-1
|
|
----
|
|
|
|
Add a machine pool that is named `mp-1` with 3 replicas of `m5.xlarge` to a cluster:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create machinepool --cluster=mycluster --replicas=3 --instance-type=m5.xlarge --name=mp-1
|
|
----
|
|
|
|
Add a machine pool with labels to a cluster:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ rosa create machinepool --cluster=mycluster --replicas=2 --instance-type=r5.2xlarge --labels=foo=bar,bar=baz --name=mp-1
|
|
----
|