You can install the Istio control plane, IstioRevisionTag
resource, Istio CNI, and the Bookinfo demo application using the RevisionBased
update strategy.
You can use the following section to understand the update process. You can skip this installation if the cluster already includes an Istio deployment.
Create the istio-cni
and istio-system
namespace by running the following command:
Install the Istio CNI plugin with the desired version. The following example configuration creates an IstioCNI
resource named default in the istio-cni
namespace:
Deploy the Istio control plane using the RevisionBased
update strategy. The following example configuration creates an Istio
resource named default
in the istio-system
namespace:
Example configuration
Create a resource for IstioRevisionTag
. The example YAML below shows how to create one named default
:
Example configuration
Ensure that the targetRef
field is pointing to the correct Istio
resource. In the provided example, the IstioRevisionTag
is configured to reference the Istio
resource that has the name default
.
Get the IstioRevision
name by running the following command:
Example output
The IstioRevision
name is in the format <istio_resource_name>-<version>
.
Set up the application workloads to execute in the cluster. For instance, you can deploy the bookinfo
sample application into the bookinfo
namespace.
Generate the bookinfo
namespace with the command below:
Apply a label to the bookinfo
namespace to activate automatic sidecar injection. Use the following command:
Deploy the bookinfo
application pods into the bookinfo
namespace by executing this command:
Inspect the IstioRevisionTag
resource using the following command:
Example output
The IN USE
field shows True
because both active workloads and the bookinfo
namespace now reference the tag.
Confirm that the proxy version matches the control plane version by running the following command:
The VERSION
column should match the control plane version.
Example output
With the RevisionBased
update strategy for Istio, an IstioRevisionTag
resource can be used to tag a specific IstioRevision
. This allows you to attach workloads to that revision without needing to modify the istio.io/rev
label on namespaces or pods.
istioctl
on your local machine.RevisionBased
update strategy. In this example, the Istio
resource named default
is deployed in the istio-system
namespace.IstioRevisionTag
resource where the targetRef
field correctly points to the desired Istio
resource.IstioCNI
resource named default
is deployed in the istio-cni
namespace.bookinfo
namespace to enable sidecar injection.bookinfo
namespace.InUse
field of the IstioRevisionTag
resource is true
.Change the version in the Istio
resource. For example, to update to Istio 1.26.3
, set the spec.version field to v1.26.3
by running the following command:
Version update in Istio CR
The Service Mesh v2 Operator deploys a new version of the control plane alongside the old version of the control plane. The sidecars remain connected to the old control plane.
Confirm that both Istio
and IstioRevision
resources are ready with the new revision.
Confirm that Istio
resource is ready by running the following command:
Example output
Confirm that IstioRevision
resource is ready by running the following command:
Example output
Confirm that IstioRevisionTag
resource is ready by running the following command:
Example output
Confirm that there are two control plane pods running, one for each revision by running the following command:
Example output
Confirm that the workload sidecars are still connected to the previous control plane by running the following command:
Example output
The VERSION
column should match the old control plane version.
Restart the application workloads so that the new version of the sidecar gets injected by running the following command:
Verify that the new version of the sidecar is running by entering the following command:
The VERSION
column should match the new control plane version.
Verify that the old control plane, Istio
, and IstioRevision
resources has been deleted.
Istio
resource has been deleted by running the following command:
IstioRevision
resource has been deleted by running the following command:
The Alauda Service Mesh v2 Operator deletes the old IstioRevision
resource and the associated control plane after the grace period defined in the spec.updateStrategy.inactiveRevisionDeletionGracePeriodSeconds
field expires. The default grace period is 30
seconds.
You can increase the grace period to allow sufficient time to test the new control plane before removing the previous revision. Set a higher value during canary upgrades to ensure workload stability before fully transitioning.