mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
93 lines
2.9 KiB
Plaintext
93 lines
2.9 KiB
Plaintext
|
|
// Module included in the following assemblies:
|
||
|
|
//
|
||
|
|
// * hosted_control_planes/hcp-manage/hcp-manage-openstack.adoc
|
||
|
|
|
||
|
|
:_mod-docs-content-type: PROCEDURE
|
||
|
|
[id="hcp-manage-openstack-az_{context}"]
|
||
|
|
= Configuring node pools for availability zones
|
||
|
|
|
||
|
|
You can distribute node pools across multiple {rh-openstack-first} Nova availability zones to improve the high availability of your hosted cluster.
|
||
|
|
|
||
|
|
NOTE: Availability zones do not necessarily correspond to fault domains and do not inherently provide high availability benefits.
|
||
|
|
|
||
|
|
.Prerequisites
|
||
|
|
|
||
|
|
* You created a hosted cluster.
|
||
|
|
* You have access to the management cluster.
|
||
|
|
* The `hcp` and `oc` CLIs are installed.
|
||
|
|
|
||
|
|
.Procedure
|
||
|
|
|
||
|
|
. Set environment variables that are appropriate for your needs. For example, if you want to create two additional machines in the `az1` availability zone, you could enter:
|
||
|
|
+
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
$ export NODEPOOL_NAME="${CLUSTER_NAME}-az1" \
|
||
|
|
&& export WORKER_COUNT="2" \
|
||
|
|
&& export FLAVOR="m1.xlarge" \
|
||
|
|
&& export AZ="az1"
|
||
|
|
----
|
||
|
|
|
||
|
|
. Create the node pool by using your environment variables by entering the following command:
|
||
|
|
+
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
$ hcp create nodepool openstack \
|
||
|
|
--cluster-name <cluster_name> \
|
||
|
|
--name $NODEPOOL_NAME \
|
||
|
|
--replicas $WORKER_COUNT \
|
||
|
|
--openstack-node-flavor $FLAVOR \
|
||
|
|
--openstack-node-availability-zone $AZ
|
||
|
|
----
|
||
|
|
+
|
||
|
|
--
|
||
|
|
where:
|
||
|
|
|
||
|
|
`<cluster_name>`:: Specifies the name of your hosted cluster.
|
||
|
|
--
|
||
|
|
|
||
|
|
. Check the status of the node pool by listing `nodepool` resources in the clusters namespace by running the following command:
|
||
|
|
+
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
$ oc get nodepools --namespace clusters
|
||
|
|
----
|
||
|
|
+
|
||
|
|
.Example output
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE
|
||
|
|
example example 5 5 False False 4.17.0
|
||
|
|
example-az1 example 2 False False True True Minimum availability requires 2 replicas, current 0 available
|
||
|
|
----
|
||
|
|
|
||
|
|
. Observe the notes as they start on your hosted cluster by running the following command:
|
||
|
|
+
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
$ oc --kubeconfig $CLUSTER_NAME-kubeconfig get nodes
|
||
|
|
----
|
||
|
|
+
|
||
|
|
.Example output
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
NAME STATUS ROLES AGE VERSION
|
||
|
|
...
|
||
|
|
example-extra-az-zh9l5 Ready worker 2m6s v1.27.4+18eadca
|
||
|
|
example-extra-az-zr8mj Ready worker 102s v1.27.4+18eadca
|
||
|
|
...
|
||
|
|
----
|
||
|
|
|
||
|
|
. Verify that the node pool is created by running the following command:
|
||
|
|
+
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
$ oc get nodepools --namespace clusters
|
||
|
|
----
|
||
|
|
+
|
||
|
|
.Example output
|
||
|
|
[source,terminal]
|
||
|
|
----
|
||
|
|
NAME CLUSTER DESIRED CURRENT AVAILABLE PROGRESSING MESSAGE
|
||
|
|
<node_pool_name> <cluster_name> 2 2 2 False All replicas are available
|
||
|
|
----
|