Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. Updating the Istio CNI
Review the update procedure for the Istio Container Network Interface (CNI). Ensure the CNI plugin remains compatible with the OpenShift Service Mesh control plane during an upgrade.
4.1. About the Istio CNI update process Copia collegamentoCollegamento copiato negli appunti!
The Istio Container Network Interface (CNI) update process uses Inplace updates. When the IstioCNI resource changes, the daemonset automatically replaces the existing istio-cni-node pods with the specified version of the CNI plugin.
You can use the following field to manage version updates:
spec.version-
defines the CNI plugin version to install. Specify the value in the format
vX.Y.Z, whereX.Y.Zrepresents the required version. For example, usev1.27.3to install the CNI plugin version1.27.3.
To update the CNI plugin, change the spec.version field with the target version. The IstioCNI resource also includes a values field that exposes configuration options from the istio-cni chart.
In ambient mode, the Istio CNI component manages traffic redirection. During RevisionBased upgrades, the component remains compatible with the control plane’s old version and continues to manage traffic redirection for both the old and the new control planes throughout the migration.
The Istio CNI is compatible with a control plane running the same minor version or one minor version higher.
After you update the Istio control plane, update the Istio CNI component. The OpenShift Service Mesh Operator deploys a new version of the CNI plugin, replacing the existing one. The istio-cni-node DaemonSet pods update using a rolling update strategy, ensuring that traffic redirection rules remain active during the entire update process.
4.1.1. Updating the Istio CNI resource version Copia collegamentoCollegamento copiato negli appunti!
You can update the Istio Container Network Interface (CNI) resource version by changing the version in the resource. Then, the Service Mesh Operator deploys a new version of the CNI plugin that replaces the old version of the CNI plugin. The istio-cni-node pods automatically reconnect to the new CNI plugin.
Prerequisites
-
You are logged in to OpenShift Container Platform as a user with the
cluster-adminrole. - You have installed the Red Hat OpenShift Service Mesh Operator and deployed Istio.
-
You have installed the Istio CNI plugin with the required version. In the following example, the
IstioCNIresource nameddefaultis deployed in theistio-cninamespace. -
You have either updated the Istio control plane to the required version (for
Inplacestrategy) or created a new control plane revision (forRevisionBasedstrategy).
Procedure
Change the version in the
Istioresource. For example, to update to Istio1.27.3, set thespec.versionfield to1.27.3by running the following command:oc patch istiocni default -n istio-cni --type='merge' -p '{"spec":{"version":"v1.27.3"}}'$ oc patch istiocni default -n istio-cni --type='merge' -p '{"spec":{"version":"v1.27.3"}}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Wait for the
IstioCNIDaemonSet to reach theReadystatus after the update by running the following command:oc wait --for=condition=Ready istiocnis/default --timeout=5m
$ oc wait --for=condition=Ready istiocnis/default --timeout=5mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm that the new version of the CNI plugin is ready by running the following command:
oc get istiocni default
$ oc get istiocni defaultCopy to Clipboard Copied! Toggle word wrap Toggle overflow You should see an output similar to the following example:
NAME READY STATUS VERSION AGE default True Healthy v{istio-latest} 7d1hNAME READY STATUS VERSION AGE default True Healthy v{istio-latest} 7d1hCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the status of the pods by running the following command:
oc get pods -n istio-cni
$ oc get pods -n istio-cniCopy to Clipboard Copied! Toggle word wrap Toggle overflow You should see an output similar to the following example:
NAME READY STATUS RESTARTS AGE istio-cni-node-abc12 1/1 Running 0 3m istio-cni-node-def34 1/1 Running 0 3m istio-cni-node-ghi56 1/1 Running 0 3m
NAME READY STATUS RESTARTS AGE istio-cni-node-abc12 1/1 Running 0 3m istio-cni-node-def34 1/1 Running 0 3m istio-cni-node-ghi56 1/1 Running 0 3mCopy to Clipboard Copied! Toggle word wrap Toggle overflow
When you use the RevisionBased strategy, the Istio CNI component remains compatible with many control plane versions. It continues to manage traffic redirection for both the old and the new control planes throughout the migration. The Istio CNI is compatible with a control plane running the same minor version or one minor version higher.