Skip to content

Commit d1ed0d4

Browse files
committed
OSSM-4815: Document HA for a mesh
1 parent 89d63b0 commit d1ed0d4

6 files changed

+216
-2
lines changed

install/ossm-installing-openshift-service-mesh.adoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include::modules/ossm-about-istio-control-plane-update-strategies.adoc
1818
[leveloffset=+2]
1919
include::modules/ossm-installing-operator.adoc[leveloffset=+1]
2020

21-
[role="_additional-resources"]
21+
[role="_additional-resources-multiple-meshes"]
2222
.Additional resources
2323
* xref:../install/ossm-deploying-multiple-service-meshes-on-single-cluster.adoc#ossm-deploying-multiple-service-meshes-on-single-cluster[Deploying multiple service meshes on a single cluster]
2424
@@ -41,8 +41,18 @@ include::modules/ossm-about-accessing-bookinfo-application-using-gateway.adoc[le
4141
include::modules/ossm-accessing-bookinfo-application-using-istio-gateway-injection.adoc[leveloffset=+2]
4242
include::modules/ossm-accessing-bookinfo-application-using-gateway-api.adoc[leveloffset=+2]
4343
44-
[role="_additional-resources"]
44+
[role="_additional-resources-gateway-api"]
4545
.Additional resources
4646
* link:https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/networking/configuring-ingress-cluster-traffic[Configuring ingress cluster traffic]
4747
4848
include::modules/ossm-customizing-istio-configuration.adoc[leveloffset=+1]
49+
50+
include::modules/ossm-about-istio-high-availability.adoc[leveloffset=+1]
51+
include::modules/ossm-configuring-istio-ha-autoscaling.adoc[leveloffset=+2]
52+
include::modules/ossm-api-settings-mesh-ha-autoscaling.adoc[leveloffset=+3]
53+
54+
[role="_additional-resources-pod-scaling"]
55+
.Additional resources
56+
* link:https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/[Horizontal Pod Autoscaling]
57+
58+
include::modules/ossm-configuring-istio-ha-replicacount.adoc[leveloffset=+2]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This module is used in the following assemblies:
2+
// * service-mesh-docs-main/install/ossm-installing-service-mesh.adoc
3+
4+
:_mod-docs-content-type: CONCEPT
5+
[id="ossm-about-istio-high-availability_{context}"]
6+
= About Istio High Availability
7+
8+
Running the {istio} control plane in High Availability (HA) mode prevents single points of failure, and ensures continuous mesh operation even if an `istiod` pod fails. By using HA, if one `istiod` pod becomes unavailable, another one continues to manage and configure the {istio} control plane, preventing service outages or disruptions. HA provides scalability by distributing the control plane workload, enables graceful upgrades, supports disaster recovery operations, and protects against zone-wide mesh outages.
9+
10+
There are two ways for a system administrator to configure HA for the {istio} deployment:
11+
12+
* Defining a static replica count: This approach involves setting a fixed number of `istiod` pods, providing a consistent level of redundancy.
13+
14+
* Using autoscaling: This approach dynamically adjusts the number of `istiod` pods based on resource utilization or custom metrics, providing more efficient resource consumption for fluctuating workloads.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// This module is used in the following assemblies:
2+
// * service-mesh-docs-main/install/ossm-installing-service-mesh.adoc
3+
4+
:_mod-docs-content-type: REFERENCE
5+
[id="ossm-api-settings-mesh-ha-autoscaling_{context}"]
6+
= API settings for Service Mesh HA autoscaling mode
7+
8+
Use the following `istio` custom resource definition (CRD) parameters when you configure a service mesh for High Availability (HA) by using autoscaling.
9+
10+
.HA API parameters
11+
[cols="1,1"]
12+
|===
13+
|Parameter |Description
14+
15+
|`autoScaleMin` | Defines the minimum number of `istiod` pods for an istio deployment. Each pod contains one instance of the Istio control plane.
16+
17+
{ocp-short-name} only uses this parameter when the {istio} deployment uses the Horizontal Pod Autoscaler (HPA) configuration.
18+
|`autoScaleMax` | Defines the maximum number of `istiod` pods for an {istio} deployment. Each pod contains one instance of the {istio} control plane.
19+
20+
For {ocp-short-name} to automatically scale the number of `istiod` pods based on load, you must set this parameter to a value that is greater than the value that you defined for the `autoScaleMin` parameter.
21+
22+
You must also configure metrics for autoscaling to work properly. If no metrics are configured, the autoscaler does not scale up or down.
23+
24+
{ocp-short-name} only uses this parameter when the {istio} deployment uses the HPA configuration.
25+
|`cpu.targetAverageUtilization` | Defines the target CPU utilization for the `istiod` pod. If the average CPU usage exceeds the threshold that this parameter defines, the HPA automatically increases the number of replica pods.
26+
|`memory.targetAverageUtilization` | Defines the target memory utilization for the `istiod` pod. If the average memory usage exceeds the threshold that this parameter defines, the HPA automatically increases the number of replica pods.
27+
|`behavior` | You can use the `behavior` field to define additional policies that {ocp-short-name} uses to scale {istio} resources up or down.
28+
29+
For more information, see link:https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#configurable-scaling-behavior[Configurable Scaling Behavior].
30+
|===
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This module is used in the following assemblies:
2+
// * service-mesh-docs-main/install/ossm-installing-service-mesh.adoc
3+
4+
:_mod-docs-content-type: REFERENCE
5+
[id="ossm-api-settings-mesh-ha-replicacount_{context}"]
6+
= API settings for Service Mesh HA replica count mode
7+
8+
Use the following `istio` custom resource definition (CRD) parameters when you configure a service mesh for High Availability (HA) by using replica count.
9+
10+
.HA API parameters
11+
[cols="1,1"]
12+
|===
13+
|Parameter |Description
14+
15+
|`replicaCount` | Defines the number of `istiod` pods for an istio deployment. Each pod contains one instance of the `istio` control plane. The default setting is `1`.
16+
17+
You must set `replicaCount` to a value of `2` or greater to support HA.
18+
19+
{ocp-short-name} only uses this parameter when the `istio` deployment does not use the Horizontal Pod Autoscaler (HPA) configuration.
20+
|===
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// This procedure is used in the following assembly:
2+
// * service-mesh-docs-main/install/ossm-installing-service-mesh.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="ossm-configuring-istio-ha-autoscaling_{context}"]
6+
= Configuring Istio HA by using autoscaling
7+
8+
Configure the {istio} control plane in High Availability (HA) mode to prevent a single point of failure, and ensure continuous mesh operation even if one of the `istiod` pods fails. Autoscaling defines the minimum and maximum number of {istio} control plane pods that can operate. {ocp-product-title} uses these values to scale the number of control planes in operation based on resource utilization, such as CPU or memory, to efficiently respond to the varying number of workloads and overall traffic patterns within the mesh.
9+
10+
.Prerequisites
11+
12+
* You are logged in to the {ocp-product-title} web console as a user with the `cluster-admin` role.
13+
14+
* You installed the {SMProductName} Operator.
15+
16+
* You deployed the {istio} resource.
17+
18+
.Procedure
19+
20+
. In the {ocp-product-title} web console, click *Installed Operators*.
21+
22+
. Click {SMProductName} 3 Operator.
23+
24+
. Click *Istio*.
25+
26+
. Click the name of the {istio} installation. For example, `default`.
27+
28+
. Click *YAML*.
29+
30+
. Modify the {istio} custom resource.
31+
+
32+
.Example configuration
33+
[source,yaml,subs="attributes,verbatim"]
34+
----
35+
apiVersion: sailoperator.io/v1
36+
kind: Istio
37+
metadata:
38+
name: default
39+
spec:
40+
namespace: istio-system
41+
values:
42+
pilot:
43+
autoscaleMin: 2 # <1>
44+
autoscaleMax: 5 # <2>
45+
cpu:
46+
targetAverageUtilization: 80 # <3>
47+
memory:
48+
targetAverageUtilization: 80 # <4>
49+
----
50+
<1> Defines the minimum number of {istio} control plane replicas that always run.
51+
<2> Defines the maximum number of {istio} control plane replicas, allowing for scaling based on load. To support HA, there must be at least two replicas.
52+
<3> Defines the target CPU utilization for autoscaling to 80%. If the average CPU usage exceeds this threshold, the Horizontal Pod Autoscaler (HPA) automatically increases the number of replicas.
53+
<4> Defines the target memory utilization for autoscaling to 80%. If the average memory usage exceeds this threshold, the HPA automatically increases the number of replicas.
54+
55+
.Verification
56+
57+
. Verify the status of the {istio} control pods by running the following command:
58+
+
59+
[source,terminal]
60+
----
61+
$ oc get pods -n istio-system -l app=istiod
62+
----
63+
+
64+
.Example output
65+
[source,terminal]
66+
----
67+
NAME READY STATUS RESTARTS AGE
68+
istiod-7c7b6564c9-nwhsg 1/1 Running 0 70s
69+
istiod-7c7b6564c9-xkmsl 1/1 Running 0 85s
70+
----
71+
+
72+
Two `istiod` pods are running. Two pods, the minimum requirement for an HA {istio} control plane, indicates that a basic HA setup is in place.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// This procedure is used in the following assembly:
2+
// * service-mesh-docs-main/install/ossm-installing-service-mesh.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="ossm-configuring-istio-ha-replicacount_{context}"]
6+
= Configuring Istio HA by using replica count
7+
8+
Configure the {istio} control plane in High Availability (HA) mode to prevent a single point of failure, and ensure continuous mesh operation even if one of the `istiod` pods fails. The replica count defines a fixed number of {istio} control plane pods that can operate. Use replica count for mesh environments where the control plane workload is relatively stable or predictable, or when you prefer to manually scale the `istiod` pod.
9+
10+
.Prerequisites
11+
12+
* You are logged in to the {ocp-product-title} web console as a user with the `cluster-admin` role.
13+
14+
* You installed the {SMProductName} Operator.
15+
16+
* You deployed the {istio} resource.
17+
18+
.Procedure
19+
20+
. Obtain the name of the {istio} resource by running the following command:
21+
+
22+
[source,terminal]
23+
----
24+
$ oc get istio -n istio-sytem
25+
----
26+
+
27+
.Example output
28+
[source,terminal]
29+
----
30+
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE
31+
default 1 1 0 default Healthy v1.24.6 24m
32+
----
33+
+
34+
The name of the {istio} resource is `default`.
35+
36+
. Update the {istio} custom resource by adding the `autoscaleEnabled` and `replicaCount` parameters by running the following command:
37+
+
38+
[source,terminal]
39+
----
40+
$ oc patch istio default -n istio-system --type merge -p '
41+
spec:
42+
values:
43+
pilot:
44+
autoscaleEnabled: false <1>
45+
replicaCount: 2 <2>
46+
'
47+
----
48+
<1> Disables autoscaling and ensures that the number of replicas remains fixed.
49+
<2> Defines the number of {istio} control plane replicas. To support HA, there must be at least two replicas.
50+
51+
.Verification
52+
53+
. Verify the status of the {Istio} control pods by running the following command:
54+
+
55+
[source,terminal]
56+
----
57+
$ oc get pods -n istio-system -l app=istiod
58+
----
59+
+
60+
.Example output
61+
[source,terminal]
62+
----
63+
NAME READY STATUS RESTARTS AGE
64+
istiod-7c7b6564c9-nwhsg 1/1 Running 0 70s
65+
istiod-7c7b6564c9-xkmsl 1/1 Running 0 85s
66+
----
67+
+
68+
Two `istiod` pods are running, which is the minimum requirement for an HA {istio} control plane and indicates that a basic HA setup is in place.

0 commit comments

Comments
 (0)