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.
To remove Istio from the virtual machine, stop the background services, the smm-agent service must be stopped first to prevent istio and node-exporter restarting by smm-agent:
systemctl stop smm-agent && systemctl stop istio && systemctl stop smm-node-exporter
The last command will not just stop Istio, but will also cause the VM’s
WorkloadEntryto be removed from the VM’s namespace.
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 smm-agent downloads cache:
rm -f /var/cache/smm-agent/downloads/*
Remove Kubernetes resources
Remove the associated
PeerAuthentication objects from your workload’s namespace.