The InPlace
update strategy runs only one revision of the control plane at a time. During an update, all the workloads immediately connect to the new control plane version. To maintain compatibility between the sidecars and the control plane, you can upgrade only one minor version at a time.
The InPlace
strategy updates and restarts the existing Istio control plane in place. During this process, only one instance of the control plane exists, eliminating the need to move workloads to a new control plane instance. To complete the update, restart the application workloads and gateways to refresh the Envoy proxies.
While the InPlace
strategy offers simplicity and efficiency, there's a slight possibility of application traffic interruption if a workload pod updates, restarts, or scales while the control plane is restarting. You can mitigate this risk by running multiple replicas of the Istio control plane (istiod).
To select the InPlace
strategy, set the spec.updateStrategy.type
value in the Istio resource to InPlace
.
Example specification to select InPlace update strategy
You can set this value while creating the resource or edit it later. If you edit the resource after creation, make the change before updating the Istio control plane.
You can install the Istio control plane, Istio CNI, and the Bookinfo demo application using the InPlace
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.
Procedure
Create the istio-system
namespace by running the following command:
Attach the workloads to a control plane deployed using the InPlace
strategy:
Label the namespace to automatically include all workloads by entering the following command:
Apply the revision label to individual workloads by modifying the pod template in the Deployment
resource. For example:
If the revision name is default
, attach the workloads to the revision by running the following command. The following example labels the namespace with istio-injection: enabled
label.
Deploy the Istio control plane using the InPlace
update strategy. The following example configuration creates an Istio
resource named default
in the istio-system
namespace:
Example configuration
Install the Istio CNI plugin with the desired version. The following example configuration creates an IstioCNI
resource named default in the istio-cni
namespace:
When updating Istio using the InPlace
strategy, you can increment the version by only one minor release at a time. To update by more than one minor version, you must increment the version and restart the workloads after each update. Restarting workloads ensures compatibility between the sidecar and control plane versions. The update process is complete after restarting all workloads.
Prerequisites
istioctl
on your local machine.InPlace
update strategy. In this example, the Istio
resource named default
is deployed in the istio-system
namespace.IstioCNI
resource named default
is deployed in the istio-cni
namespace.bookinfo
namespace to enable sidecar injection.bookinfo
namespace.Procedure
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 that replaces the old version of the control plane. The sidecars automatically reconnect to the new control plane.
Confirm that the new version of the control plane is ready by running the following command:
Example output
Restart the application workloads so that the new version of the sidecar gets injected by running the following command:
Verification
Verify that the new version of the sidecar is running by entering the following command:
Example output
The column VERSION
should match with the new control plane version.