az openshift

Manage Azure Red Hat OpenShift Services.

Commands

az openshift create Create a new managed OpenShift cluster.
az openshift delete Delete a managed OpenShift cluster.
az openshift list List managed OpenShift clusters.
az openshift scale Scale the compute pool in a managed OpenShift cluster.
az openshift show Show the details for a managed OpenShift cluster.
az openshift wait Wait for a managed OpenShift cluster to reach a desired state.

az openshift create

Create a new managed OpenShift cluster.

az openshift create --name
--resource-group
[--aad-client-app-id]
[--aad-client-app-secret]
[--aad-tenant-id]
[--compute-count]
[--compute-vm-size]
[--customer-admin-group-id]
[--location]
[--no-wait]
[--subnet-prefix]
[--subscription]
[--tags]
[--vnet-peer]
[--vnet-prefix]

Examples

Create an OpenShift cluster and auto create an AAD Client

az openshift create -g MyResourceGroup -n MyManagedCluster

Create an OpenShift cluster and auto create an AAD Client and setup cluster admin group

az openshift create -g MyResourceGroup -n MyManagedCluster --customer-admin-group-id {GROUP_ID}

Create an OpenShift cluster with 5 compute nodes and a custom AAD Client.

az openshift create -g MyResourceGroup -n MyManagedCluster --aad-client-app-id {APP_ID} --aad-client-app-secret {APP_SECRET} --aad-tenant-id {TENANT_ID} --compute-count 5

Create an Openshift cluster using a custom vnet

az openshift create -g MyResourceGroup -n MyManagedCluster --vnet-peer "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/openshift-vnet/providers/Microsoft.Network/virtualNetworks/test"

Required Parameters

--name -n

Name of the managed OpenShift cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--aad-client-app-id

The ID of an Azure Active Directory client application. If not specified, a new Azure Active Directory client is created.

--aad-client-app-secret

The secret of an Azure Active Directory client application.

--aad-tenant-id

The ID of an Azure Active Directory tenant.

--compute-count -c

Number of nodes in the OpenShift node pool.

default value: 4
--compute-vm-size -s

Size of Virtual Machines to create as OpenShift nodes.

default value: Standard_D4s_v3
--customer-admin-group-id

The Object ID of an Azure Active Directory Group that memberships will get synced into the OpenShift group "osa-customer-admins". If not specified, no cluster admin access will be granted.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--no-wait

Do not wait for the long-running operation to finish.

--subnet-prefix

The CIDR used on the Subnet into which to deploy the cluster.

default value: 10.0.0.0/24
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--vnet-peer

The ID or the name of a subnet in an existing VNet into which to peer the cluster.

--vnet-prefix

The CIDR used on the VNet into which to deploy the cluster.

default value: 10.0.0.0/8

az openshift delete

Delete a managed OpenShift cluster.

az openshift delete --name
--resource-group
[--no-wait]
[--subscription]
[--yes]

Examples

Delete a managed OpenShift cluster. (autogenerated)

az openshift delete --name MyManagedOpenShiftCluster --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed OpenShift cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az openshift list

List managed OpenShift clusters.

az openshift list [--resource-group]
[--subscription]

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az openshift scale

Scale the compute pool in a managed OpenShift cluster.

az openshift scale --compute-count
--name
--resource-group
[--no-wait]
[--subscription]

Examples

Scale the compute pool in a managed OpenShift cluster. (autogenerated)

az openshift scale --compute-count 5 --name MyManagedOpenShiftCluster --resource-group MyResourceGroup

Required Parameters

--compute-count -c

Number of nodes in the OpenShift compute pool.

default value: 4
--name -n

Name of the managed OpenShift cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az openshift show

Show the details for a managed OpenShift cluster.

az openshift show --name
--resource-group
[--subscription]

Examples

Show the details for a managed OpenShift cluster. (autogenerated)

az openshift show --name MyManagedOpenShiftCluster --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the managed OpenShift cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az openshift wait

Wait for a managed OpenShift cluster to reach a desired state.

az openshift wait --name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--subscription]
[--timeout]
[--updated]

Examples

Wait for a cluster to be upgraded, polling every minute for up to thirty minutes.

az openshift wait -g MyResourceGroup -n MyManagedCluster --updated --interval 60 --timeout 1800

Required Parameters

--name -n

Name of the managed OpenShift cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.