Skip to content

Commit dcbcdd7

Browse files
authored
Merge pull request #187683 from SanyaKochhar/cert-manager
arc(osm): document support of contour, cert-manager, TKG
2 parents b2cf05a + c9124b0 commit dcbcdd7

File tree

1 file changed

+80
-29
lines changed

1 file changed

+80
-29
lines changed

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

Lines changed: 80 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ OSM runs an Envoy-based control plane on Kubernetes, can be configured with [SMI
2727
- Rancher Kubernetes Engine
2828
- OpenShift Kubernetes Distribution
2929
- Amazon Elastic Kubernetes Service
30+
- VMware Tanzu Kubernetes Grid
3031
- Azure Monitor integration with Azure Arc-enabled Open Service Mesh is available with [limited support](https://github.com/microsoft/Docker-Provider/blob/ci_dev/Documentation/OSMPrivatePreview/ReadMe.md).
3132

3233
[!INCLUDE [preview features note](./includes/preview/preview-callout.md)]
@@ -36,13 +37,10 @@ OSM runs an Envoy-based control plane on Kubernetes, can be configured with [SMI
3637
- Ensure you have met all the common prerequisites for cluster extensions listed [here](extensions.md#prerequisites).
3738
- Use az k8s-extension CLI version >= v0.4.0
3839

39-
## Install Azure Arc-enabled Open Service Mesh (OSM) on an Azure Arc-enabled Kubernetes cluster
40+
## Basic Installation of Azure Arc-enabled OSM on an Azure Arc-enabled Kubernetes Cluster
4041

41-
The following steps assume that you already have a cluster with supported Kubernetes distribution connected to Azure Arc.
42-
43-
### Install a specific version of OSM
44-
45-
Ensure that your KUBECONFIG environment variable points to the kubeconfig of the Kubernetes cluster where you want the OSM extension installed.
42+
The following steps assume that you already have a cluster with a supported Kubernetes distribution connected to Azure Arc.
43+
Ensure that your KUBECONFIG environment variable points to the kubeconfig of the Arc-enabled Kubernetes cluster.
4644

4745
Set the environment variables:
4846

@@ -52,7 +50,7 @@ export CLUSTER_NAME=<arc-cluster-name>
5250
export RESOURCE_GROUP=<resource-group-name>
5351
```
5452

55-
While Azure Arc-enabled Open Service Mesh is in preview, the `az k8s-extension create` command only accepts `pilot` for the `--release-train` flag. `--auto-upgrade-minor-version` is always set to `false` and a version must be provided. If you have an OpenShift cluster, use the steps in the [section](#install-a-specific-version-of-osm-on-openshift-cluster).
53+
While Azure Arc-enabled Open Service Mesh is in preview, the `az k8s-extension create` command only accepts `pilot` for the `--release-train` flag. `--auto-upgrade-minor-version` is always set to `false` and a version must be provided. If you are using an OpenShift cluster, use the steps in the [section](#install-osm-on-an-openshift-cluster).
5654

5755
```azurecli-interactive
5856
az k8s-extension create --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --extension-type Microsoft.openservicemesh --scope cluster --release-train pilot --name osm --version $VERSION
@@ -91,24 +89,20 @@ You should see output similar to the output shown below. It may take 3-5 minutes
9189
}
9290
```
9391

94-
### Install a specific version of OSM on OpenShift cluster
92+
## Custom Installations of Azure Arc-enabled OSM
93+
The following sections describe certain custom installations of Azure Arc-enabled OSM. Custom installations require setting
94+
values of OSM by in a JSON file and passing them into `k8s-extension create` CLI command as described below.
95+
96+
### Install OSM on an OpenShift cluster
9597

9698
1. Copy and save the following contents into a JSON file. If you have already created a configuration settings file, please add the following line to the existing file to preserve your previous changes.
9799
```json
98100
{
99-
"osm.OpenServiceMesh.enablePrivilegedInitContainer": "true"
101+
"osm.osm.enablePrivilegedInitContainer": "true"
100102
}
101103
```
102-
103-
Set the file path as an environment variable:
104-
```azurecli-interactive
105-
export SETTINGS_FILE=<json-file-path>
106-
```
107104

108-
2. Run the `az k8s-extension create` command used to create the OSM extension, and pass in the settings file using configuration settings:
109-
```azurecli-interactive
110-
az k8s-extension create --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --extension-type Microsoft.openservicemesh --scope cluster --release-train pilot --name osm --version $VERSION --configuration-settings-file $SETTINGS_FILE
111-
```
105+
2. [Install OSM with custom values](#setting-values-during-osm-installation).
112106

113107
3. Add the privileged [security context constraint](https://docs.openshift.com/container-platform/4.7/authentication/managing-security-context-constraints.html) to each service account for the applications in the mesh.
114108
```azurecli-interactive
@@ -117,9 +111,68 @@ You should see output similar to the output shown below. It may take 3-5 minutes
117111

118112
It may take 3-5 minutes for the actual OSM helm chart to get deployed to the cluster. Until this deployment happens, you will continue to see installState as Pending.
119113

120-
To ensure that the privileged init container setting is not reverted to the default, pass in the "osm.OpenServiceMesh.enablePrivilegedInitContainer" : "true" configuration setting to all subsequent az k8s-extension create commands.
114+
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.
115+
116+
### Install OSM with cert-manager for Certificate Management
117+
[cert-manager](https://cert-manager.io/) is a provider that can be used for issuing signed certificates to OSM without
118+
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/)
119+
and [demo](https://docs.openservicemesh.io/docs/demos/cert-manager_integration/) to learn more.
120+
> [!NOTE]
121+
> Use the commands provided in the OSM GitHub documentation with caution. Ensure that you use the correct namespace name `arc-osm-system`.
122+
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,
125+
also include and update the subsequent `certmanager.issuer` lines.
126+
127+
```json
128+
{
129+
"osm.osm.certificateProvider.kind" : "cert-manager",
130+
"osm.osm.certmanager.issuerName" : "<issuer name>",
131+
"osm.osm.certmanager.issuerKind" : "<issuer kind>",
132+
"osm.osm.certmanager.issuerGroup" : "<issuer group>"
133+
}
134+
```
135+
136+
Now, [install OSM with custom values](#setting-values-during-osm-installation).
137+
138+
### Install OSM with Contour for Ingress
139+
OSM provides multiple options to expose mesh services externally using ingress. OSM can use [Contour](https://projectcontour.io/), which
140+
works with the ingress controller installed outside the mesh and provisioned with a certificate to participate in the mesh.
141+
Refer to [OSM's ingress documentation](https://docs.openservicemesh.io/docs/guides/traffic_management/ingress/#1-using-contour-ingress-controller-and-gateway)
142+
and [demo](https://docs.openservicemesh.io/docs/demos/ingress_contour/) to learn more.
121143

122-
### Install Azure Arc-enabled OSM using ARM template
144+
> [!NOTE]
145+
> Use the commands provided in the OSM GitHub documentation with caution. Ensure that you use the correct namespace name `arc-osm-system`.
146+
147+
To set required values for configuring Contour during OSM installation, create the following JSON file:
148+
```json
149+
{
150+
"osm.osm.osmNamespace" : "arc-osm-system",
151+
"osm.contour.enabled" : "true",
152+
"osm.contour.configInline.tls.envoy-client-certificate.name" : "osm-contour-envoy-client-cert",
153+
"osm.contour.configInline.tls.envoy-client-certificate.namespace" : "arc-osm-system"
154+
}
155+
```
156+
157+
Now, [install OSM with custom values](#setting-values-during-osm-installation).
158+
159+
### 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
161+
install command.
162+
163+
Once you have created a JSON file with applicable values as described in above custom installation sections, set the
164+
file path as an environment variable:
165+
```azurecli-interactive
166+
export SETTINGS_FILE=<json-file-path>
167+
```
168+
169+
Run the `az k8s-extension create` command to create the OSM extension, passing in the settings file using the
170+
`--configuration-settings` flag:
171+
```azurecli-interactive
172+
az k8s-extension create --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --extension-type Microsoft.openservicemesh --scope cluster --release-train pilot --name osm --version $VERSION --configuration-settings-file $SETTINGS_FILE
173+
```
174+
175+
## Install Azure Arc-enabled OSM using ARM template
123176

124177
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:
125178

@@ -181,22 +234,20 @@ After connecting your cluster to Azure Arc, create a json file with the followin
181234
}
182235
```
183236

184-
Now set the environment variables:
185-
237+
Set the environment variables:
186238
```azurecli-interactive
187239
export TEMPLATE_FILE_NAME=<template-file-path>
188240
export DEPLOYMENT_NAME=<desired-deployment-name>
189241
```
190242

191-
Finally, run this command to install the OSM extension through az CLI:
192-
243+
Run the command below to install the OSM extension using the az CLI:
193244
```azurecli-interactive
194245
az deployment group create --name $DEPLOYMENT_NAME --resource-group $RESOURCE_GROUP --template-file $TEMPLATE_FILE_NAME
195246
```
196247

197-
Now, you should be able to view the OSM resources and use the OSM extension in your cluster.
248+
You should now be able to view the OSM resources and use the OSM extension in your cluster.
198249

199-
## Validate the Azure Arc-enabled Open Service Mesh installation
250+
## Validate installation
200251

201252
Run the following command.
202253

@@ -330,7 +381,7 @@ To make changes to the OSM ConfigMap for version v0.8.4, use the following guida
330381
1. Copy and save the changes you wish to make in a JSON file. In this example, we are going to change the permissive_traffic_policy_mode from true to false. Each time you make a change to `osm-config`, you will have to provide the full list of changes (compared to the default `osm-config`) in a JSON file.
331382
```json
332383
{
333-
"osm.OpenServiceMesh.enablePermissiveTrafficPolicy" : "false"
384+
"osm.osm.enablePermissiveTrafficPolicy" : "false"
334385
}
335386
```
336387

@@ -348,7 +399,7 @@ To make changes to the OSM ConfigMap for version v0.8.4, use the following guida
348399
> [!NOTE]
349400
> To ensure that the ConfigMap changes are not reverted to the default, pass in the same configuration settings to all subsequent az k8s-extension create commands.
350401

351-
## Using the Azure Arc-enabled Open Service Mesh
402+
## Using Azure Arc-enabled OSM
352403

353404
To start using OSM capabilities, you need to first onboard the application namespaces to the service mesh. Download the OSM CLI from [OSM GitHub releases page](https://github.com/openservicemesh/osm/releases/). Once the namespaces are added to the mesh, you can configure the SMI policies to achieve the desired OSM capability.
354405

@@ -480,7 +531,7 @@ Make sure to back up your Custom Resources prior to deleting the CRDs so that th
480531
481532
5. Recreate Custom Resources using new CRDs
482533
483-
## Uninstall Azure Arc-enabled Open Service Mesh
534+
## Uninstall Azure Arc-enabled OSM
484535
485536
Use the following command:
486537

0 commit comments

Comments
 (0)