To perform scheduled maintenance on the virtual machine (for example, a restart), you can use one of the following methods to stop traffic to the machine. If you want to completely remove the VM from the mesh, see Remove VM from the mesh.

Shut down the service

This first approach is to shut down the service the WorkloadGroup has health checks defined against. As a result, Istio will not route any traffic to the virtual machine.

De-register the VM from the mesh

Another approach is open a terminal to the virtual machine, and stop the following services to de-register the virtual machine from the mesh:

systemctl stop smm-agent    # smm-agent would restart istio automatically if it's not running
systemctl stop istio

After you have finished the maintenance, re-register the VM.

Re-register the VM to the mesh

After you have performed the required maintenance, complete the following steps.

  1. Run the following command to re-register the VM to the mesh:

    systemctl start smm-agent

    The smm-agent will automatically synchronize the Istio configuration from the mesh’s cluster and start Istio.

  2. Verify that the WorkloadEntry for the virtual machine has been re-created in the namespace of the workload.

    Check that the new WorkloadEntry exists:

    kubectl get workloadentries -n smm-demo

    The output should be similar to:

    NAME                                    AGE     ADDRESS
    analytics-v0-   2m40s