On Google Distributed Cloud connected, you can enable or disable VM Runtime on GDC.
VM Runtime on GDC is enabled by default on Distributed Cloud connected clusters versions 1.9.0 and higher. If you don't need to run virtual machine (VM) workloads, you can disable VM Runtime on GDC to free up resources on your nodes. You can also re-enable it if it was previously disabled.
Before you begin
To enable or disable VM Runtime on GDC, you need the following:
- A Distributed Cloud connected cluster.
- The Identity and Access Management permissions
roles/edgecontainer.adminon the target project.
To use the API and to follow the verification instructions, you also need:
- The latest version of the Google Cloud CLI installed and initialized.
- The Kubernetes command-line tool,
kubectl.
Disable VM Runtime on GDC
You can disable VM Runtime on GDC using the Google Cloud console or the API.
Console
In the Google Cloud console, go to the Clusters page.
Select the cluster that you want to modify.
Click Edit.
In the System Add-ons or VM Service section, disable the VM Runtime toggle.
Click Save or Update.
API
To disable VM Runtime on GDC, make a PATCH request to the
projects.locations.clusters
method.
Specify the updateMask query parameter as systemAddonsConfig.vmServiceConfig.vmmEnabled.
PATCH https://edgecontainer.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID?updateMask=systemAddonsConfig.vmServiceConfig.vmmEnabled
Content-Type: application/json
{
"systemAddonsConfig": {
"vmServiceConfig": {
"vmmEnabled": false
}
}
}
Replace the following:
PROJECT_ID: the ID of the target projectREGION: the Google Cloud region where your cluster is locatedCLUSTER_ID: the ID of your cluster
Enable VM Runtime on GDC
VM Runtime on GDC is enabled by default for Distributed Cloud connected clusters. If you previously disabled VM Runtime on GDC, you can use the following instructions to re-enable it.
Console
In the Google Cloud console, go to the Clusters page.
Select the cluster that you want to modify.
Click Edit.
In the System Add-ons or VM Service section, enable the VM Runtime toggle.
Click Save or Update.
API
To enable VM Runtime on GDC, make a PATCH request to the
projects.locations.clusters
method.
Specify the updateMask query parameter as
systemAddonsConfig.vmServiceConfig.vmmEnabled.
PATCH https://edgecontainer.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID?updateMask=systemAddonsConfig.vmServiceConfig.vmmEnabled
Content-Type: application/json
{
"systemAddonsConfig": {
"vmServiceConfig": {
"vmmEnabled": true
}
}
}
Replace the following:
PROJECT_ID: the ID of the target projectREGION: the Google Cloud region where your cluster is locatedCLUSTER_ID: the ID of your cluster
Check the VM Runtime on GDC status
You can check the status of VM Runtime on GDC on your cluster.
To obtain credentials for your cluster, run the
gcloud edge-cloud container clusters get-credentialscommand.gcloud edge-cloud container clusters get-credentials CLUSTER_ID \ --project=PROJECT_ID \ --location=REGIONReplace the following:
CLUSTER_ID: the ID of your clusterPROJECT_ID: the ID of the target projectREGION: the Google Cloud region where your cluster is located
To describe the
VMRuntimecustom resource, run thekubectl describecommand:kubectl describe vmruntime vmruntimeIf VM Runtime on GDC is enabled, the command returns details about the resource, and
VMRuntime.Status.Readyshows astrue.If VM Runtime on GDC is disabled, the
VMRuntimeresource might not be found, or its status indicates that it's not ready.