Skip to content

Commit 4df3915

Browse files
committed
arc/osm: document high availability
* Documents HPA and PDB on OSM * Clarifies repeated usage of single json file
1 parent 73a0e4a commit 4df3915

File tree

1 file changed

+44
-7
lines changed

1 file changed

+44
-7
lines changed

articles/azure-arc/kubernetes/tutorial-arc-enabled-open-service-mesh.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ OSM runs an Envoy-based control plane on Kubernetes, can be configured with [SMI
3737
- Ensure you have met all the common prerequisites for cluster extensions listed [here](extensions.md#prerequisites).
3838
- Use az k8s-extension CLI version >= v0.4.0
3939

40-
## Basic Installation of Azure Arc-enabled OSM on an Azure Arc-enabled Kubernetes Cluster
40+
## Basic installation of Azure Arc-enabled OSM
4141

4242
The following steps assume that you already have a cluster with a supported Kubernetes distribution connected to Azure Arc.
4343
Ensure that your KUBECONFIG environment variable points to the kubeconfig of the Arc-enabled Kubernetes cluster.
@@ -89,7 +89,7 @@ You should see output similar to the output shown below. It may take 3-5 minutes
8989
}
9090
```
9191

92-
## Custom Installations of Azure Arc-enabled OSM
92+
## Custom installations of Azure Arc-enabled OSM
9393
The following sections describe certain custom installations of Azure Arc-enabled OSM. Custom installations require setting
9494
values of OSM by in a JSON file and passing them into `k8s-extension create` CLI command as described below.
9595

@@ -113,15 +113,52 @@ It may take 3-5 minutes for the actual OSM helm chart to get deployed to the clu
113113

114114
To ensure that the privileged init container setting is not reverted to the default, pass in the "osm.osm.enablePrivilegedInitContainer" : "true" configuration setting to all subsequent az k8s-extension create commands.
115115

116+
### Enable High Availability features on installation
117+
OSM's control plane components are built with High Availability and Fault Tolerance in mind. This section describes how to
118+
enable Horizontal Pod Autoscaling (HPA) and Pod Disruption Budget (PDB) during installation. Read more on the design
119+
considerations of High Availability on OSM [here](https://openservicemesh.io/docs/guides/ha_scale/high_availability/).
120+
121+
#### Horizontal Pod Autoscaling (HPA)
122+
HPA automatically scales up or down control plane pods based on the average target CPU utilization (%) and average target
123+
memory utilization (%) defined by the user. To enable HPA and set applicable values on OSM control plane pods during installation, create or
124+
append to your existing JSON settings file as below, repeating the key/value pairs for each control plane pod
125+
(`osmController`, `injector`) that you want to enable HPA on.
126+
127+
```json
128+
{
129+
"osm.osm.<control_plane_pod>.autoScale.enable" : "true",
130+
"osm.osm.<control_plane_pod>.autoScale.minReplicas" : "<allowed values: 1-10>",
131+
"osm.osm.<control_plane_pod>.autoScale.maxReplicas" : "<allowed values: 1-10>",
132+
"osm.osm.<control_plane_pod>.autoScale.cpu.targetAverageUtilization" : "<allowed values 0-100>",
133+
"osm.osm.<control_plane_pod>.autoScale.memory.targetAverageUtilization" : "<allowed values 0-100>"
134+
}
135+
```
136+
137+
Now, [install OSM with custom values](#setting-values-during-osm-installation).
138+
139+
#### Pod Disruption Budget (PDB)
140+
In order to prevent disruptions during planned outages, control plane pods `osm-controller` and `osm-injector` have a PDB
141+
that ensures there is always at least 1 pod corresponding to each control plane application.
142+
143+
To enable PDB, create or append to your existing JSON settings file as follows for each desired control plane pod
144+
(`osmController`, `injector`):
145+
```json
146+
{
147+
"osm.osm.<control_plane_pod>.enablePodDisruptionBudget" : "true"
148+
}
149+
```
150+
151+
Now, [install OSM with custom values](#setting-values-during-osm-installation).
152+
116153
### Install OSM with cert-manager for Certificate Management
117154
[cert-manager](https://cert-manager.io/) is a provider that can be used for issuing signed certificates to OSM without
118155
the need for storing private keys in Kubernetes. Refer to OSM's [cert-manager documentation](https://release-v0-11.docs.openservicemesh.io/docs/guides/certificates/)
119156
and [demo](https://docs.openservicemesh.io/docs/demos/cert-manager_integration/) to learn more.
120157
> [!NOTE]
121158
> Use the commands provided in the OSM GitHub documentation with caution. Ensure that you use the correct namespace name `arc-osm-system`.
122159
123-
To install OSM with cert-manager as the certificate provider, create a JSON file with the `certificateProvider.kind` value set to
124-
cert-manager as shown below. If you would like to change from default cert-manager values specified in OSM documentation,
160+
To install OSM with cert-manager as the certificate provider, create or append to your existing JSON settings file the `certificateProvider.kind`
161+
value set to cert-manager as shown below. If you would like to change from default cert-manager values specified in OSM documentation,
125162
also include and update the subsequent `certmanager.issuer` lines.
126163

127164
```json
@@ -144,7 +181,7 @@ and [demo](https://docs.openservicemesh.io/docs/demos/ingress_contour/) to learn
144181
> [!NOTE]
145182
> Use the commands provided in the OSM GitHub documentation with caution. Ensure that you use the correct namespace name `arc-osm-system`.
146183
147-
To set required values for configuring Contour during OSM installation, create the following JSON file:
184+
To set required values for configuring Contour during OSM installation, append the following to your JSON settings file:
148185
```json
149186
{
150187
"osm.osm.osmNamespace" : "arc-osm-system",
@@ -157,7 +194,7 @@ To set required values for configuring Contour during OSM installation, create t
157194
Now, [install OSM with custom values](#setting-values-during-osm-installation).
158195

159196
### Setting values during OSM installation
160-
Values that need to be set during OSM installation need to be saved to a JSON file and passed in through the Azure CLI
197+
Any values that need to be set during OSM installation need to be saved to a single JSON file and passed in through the Azure CLI
161198
install command.
162199

163200
Once you have created a JSON file with applicable values as described in above custom installation sections, set the
@@ -174,7 +211,7 @@ Run the `az k8s-extension create` command to create the OSM extension, passing i
174211

175212
## Install Azure Arc-enabled OSM using ARM template
176213

177-
After connecting your cluster to Azure Arc, create a json file with the following format, making sure to update the \<cluster-name\> and \<osm-arc-version\> values:
214+
After connecting your cluster to Azure Arc, create a JSON file with the following format, making sure to update the \<cluster-name\> and \<osm-arc-version\> values:
178215

179216
```json
180217
{

0 commit comments

Comments
 (0)