Updating ambient mode components
This page describes how to update the Istio control plane, the Istio CNI plugin, and the ZTunnel proxy in ambient mode. All three components use the InPlace update strategy and must be updated in this exact order. Waypoint proxies are rolled out automatically after the control plane update; see Updating waypoint proxies for the related verification steps.
TOC
Installing ambient mode with a specific versionProcedureUpdating the componentsPrerequisitesUpdating the Istio control planeUpdating the Istio CNI pluginUpdating the ZTunnel proxyVerifying ambient workloadsRemoving update resources from a development environmentInstalling ambient mode with a specific version
You can install the Istio control plane, the Istio CNI plugin, and the ZTunnel proxy in ambient mode with an explicitly pinned version, which lets you exercise the update procedure afterwards.
This section exists so that you can walk through the update process from a known starting version. Skip it if the cluster already runs Istio in ambient mode. The installation steps mirror Installing Istio ambient mode, except that each resource pins spec.version to an older release.
Procedure
-
Create the
istio-cni,istio-system, andztunnelnamespaces, each labeled withistio-discovery=enabledso that the control plane discovers them: -
Create the
IstioCNIresource with the starting version:- Pinning
spec.versiondefines the version that the update procedure starts from. - The
reconcileIptablesOnStartupoption lets the CNI agent detect and repair incompatible iptables rules in already-running ambient pods when the agent restarts — exactly the situation an upgrade creates.
- Pinning
-
Wait for the Istio CNI pods to become ready:
-
Create the
Istioresource with the same starting version:InPlaceis the default strategy, so this field is optional; it is shown here to make the strategy explicit. Ambient mode supports no other strategy.
-
Wait for the Istio control plane to become ready:
-
Create the
ZTunnelresource with the same starting version:- Unlike the installation guide, this example sets
spec.versionso that the ZTunnel update step below has an older version to move away from.
- Unlike the installation guide, this example sets
-
Wait for the ZTunnel pods to become ready:
-
Set up the application workloads in the cluster. For instance, you can deploy the Bookinfo sample application into the
bookinfonamespace. The following steps are a condensed version of Deploying the Bookinfo application in ambient mode.a. Create the
bookinfonamespace and add theistio-discovery=enabledlabel so that the control plane discovers it:b. Deploy the Bookinfo application:
c. Deploy the per-version services of the Bookinfo application:
d. Enroll all workloads of the namespace in the ambient mesh:
Updating the components
Prerequisites
- You are logged in to the Alauda Container Platform web console as cluster-admin.
- You have installed the Alauda Container Platform Networking for Multus plugin, and kube-ovn must be v4.1.5 or later.
- You have upgraded the Alauda Service Mesh Operator to version 2.1.2 or later, and the new target version is available in the Operator. For more information, see Understanding Operator updates and channels.
- Istio is deployed in ambient mode. In this example, the
Istio,IstioCNI, andZTunnelresources are all nameddefault. - You have installed
istioctlon your local machine. - Application workloads are enrolled in the ambient mesh. In this example, the Bookinfo application runs in the
bookinfonamespace; see Deploying the Bookinfo application in ambient mode.
Updating the Istio control plane
-
Change the version in the
Istioresource. For example, to update to Istio1.28.6, set thespec.versionfield tov1.28.6by running the following command:The Operator replaces the running control plane with the new version. ZTunnel and any waypoint proxies reconnect to the new istiod instance automatically; the application pods keep running and do not need a restart.
-
Wait for the control plane to become ready:
-
Confirm that the control plane reports the new version:
Example output
Updating the Istio CNI plugin
Update the Istio CNI plugin only after the control plane update has completed, because a CNI plugin at version 1.x supports a control plane at version 1.x or 1.x+1.
-
Set the
spec.versionfield of theIstioCNIresource to the same version as the control plane: -
Watch the
istio-cni-nodeDaemonSet roll out: -
Wait for the
IstioCNIresource to report readiness: -
Confirm that the CNI plugin reports the new version:
Example output
For details about the IstioCNI resource and its update behavior, see The Istio CNI update process.
Updating the ZTunnel proxy
Update the ZTunnel proxy last, after both the control plane and the CNI plugin run the new version.
Replacing a ZTunnel pod can reset long-lived TCP connections on that node. If your workloads hold long-lived connections, review The ZTunnel update process before this step and choose an appropriate mitigation.
-
Set the
spec.versionfield of theZTunnelresource to the same version as the control plane: -
Watch the ZTunnel DaemonSet roll out:
NOTEThe DaemonSet replaces ZTunnel pods node by node to keep mesh connectivity available, so the rollout can take several minutes on larger clusters.
-
Wait for the
ZTunnelresource to report readiness: -
Confirm that the ZTunnel proxy reports the new version:
Example output
-
Inspect the per-node ZTunnel pods:
Example output
Verifying ambient workloads
After all components run the new version, confirm that the workloads still participate in the mesh.
-
Check that the application pods are running:
Example output
-
Confirm that ZTunnel still proxies the workloads. Pods enrolled in the ambient mesh report the
HBONEprotocol:Example output
-
Test connectivity through the mesh by calling a service from another pod:
Example output
If you deployed waypoint proxies, additionally verify them as described in Updating waypoint proxies.
Removing update resources from a development environment
After you finish verifying the update procedure in a development environment, remove the sample application and the mesh components to release the resources: