Istio service mesh
Service mesh allows to monitor, visualize and control traffic between pods. Kubevirt supports running VMs as a part of Istio service mesh.
Limitations
Istio service mesh is only supported with a pod network masquerade binding.
Istio uses a list of ports for its own purposes, these ports must not be explicitly specified in a VMI interface.
Istio only supports IPv4.
Prerequisites
This guide assumes that Istio is already deployed and uses Istio CNI Plugin. See Istio documentation for more information.
Optionally,
istioctlbinary for troubleshooting. See Istio installation inctructions.The target namespace where the VM is created must be labelled with
istio-injection=enabledlabel.If Multus is used to manage CNI, the following
NetworkAttachmentDefinitionis required in the application namespace:apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: istio-cni
Create a VirtualMachineInstance with enabled Istio proxy injecton
The example below specifies a VMI with masquerade network interface and sidecar.istio.io/inject annotation to register the VM to the service mesh.
Istio expects each application to be associated with at least one Kubernetes service. Create the following Service exposing port 8080:
Note: Each Istio enabled VMI must feature the sidecar.istio.io/inject annotation instructing KubeVirt to perform necessary network configuration.
Verification
Verify istio-proxy sidecar is deployed and able to synchronize with Istio control plane using istioctl proxy-status command. See Istio Debbuging Envoy and Istiod documentation section for more information about proxy-status subcommand.
Troubleshooting
Istio sidecar is not deployed
Resolution: Make sure the istio-injection=enabled is added to the target namespace. If the issue persists, consult relevant part of Istio documentation.
Istio sidecar is not ready
Resolution: Make sure the sidecar.istio.io/inject: "true" annotation is defined in the created VMI and that masquerade binding is used for pod network interface.
Virt-launcher pod for VMI is stuck at initialization phase
Resolution: Make sure the istio-cni NetworkAttachmentDefinition (provided in the Prerequisites section) is created in the target namespace.
Last updated