Remove VM from the mesh

If you have successfully migrated your workload from a virtual machine to a Kubernetes workload, or if the virtual machine is not needed in the mesh anymore, you can uninstall Istio and smm-agent from the virtual machine.

Disconnect the VM from the mesh

Note: If you want to decommission the virtual machine, you can simply delete the instance. Disconnecting from the mesh is only needed if you want to keep using the virtual machine without having smm-agent and Istio running.

  1. To remove Istio from the virtual machine, stop the background services:

    systemctl stop smm-agent # Prevents auto restart of istio and node-exporter
    systemctl stop smm-node-exporter
    systemctl stop istio
    

    The last command will not just stop Istio, but will also cause the VM’s WorkloadEntry to be removed from the VM’s namespace.

  2. Use the package manager of the virtual machine’s operating system to remove the istio-sidecar and the smm-agent packages. For example:

    • On Ubuntu-based systems:

      dpkg -r istio-sidecar smm-agent
      
    • On RedHat-based systems:

      rpm -e istio-sidecar smm-agent
      

Remove Kubernetes resources

Remove the associated WorkloadGroup and PeerAuthentication objects from your workload’s namespace.