A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/compute/docs/nodes/share-node-groups below:

Share sole-tenant node groups | Compute Engine Documentation

Linux Windows

Shared sole-tenant node groups are similar to local sole-tenant node groups. For example, shared node groups cost the same, consume the same quota, and reside under a parent project in the resource hierarchy.

The difference between shared node groups and local node groups is that other projects in your organization can provision virtual machine (VM) instances in the shared node groups.

Sharing a node group across multiple projects or an organization can help you do the following:

The following diagram shows a node group that is shared with other projects so that other departments that manage VMs in those projects can provision VMs in a shared node group.

The following table compares projects that use local node groups with projects that use shared node groups. Notice that vCPU underutilization decreases in projects that use shared node groups.

Project configuration Local node groups Shared node groups Projects 10 10 vCPU / project 24 24 Node groups 10 1 Nodes / node group 1 3 vCPU / node 80 80 Utilization / node group 24 80 Underutilization / node group 56 0 Total underutilization 10 x 56 = 560 vCPUs 1 x 0 = 0 vCPUs Settings for sharing node groups

Compute Engine uses the following settings for sharing node groups and provisioning VMs in the shared node groups:

Maintenance policy considerations

When a node group uses the Migrate within node group maintenance policy, Compute Engine reserves at least 1 node for live migration events, so the node group must have at least 2 nodes. You can't schedule VMs on the reserved node, so node groups with this maintenance policy often have lower overall utilization. This makes workloads that require the Migrate within node group maintenance policy good candidates for node group sharing, as they often see the greatest benefit from improved utilization.

IAM roles and permissions

Keep in mind the following information about IAM roles and permissions when you share a node group:

Limitations Pricing

VMs in shared node groups don't incur additional charges, and there are no additional charges for sharing node groups. For more information about sole-tenant node pricing, see Sole-tenant node pricing.

Before you begin

To create a new node group and share it with other projects or with the entire organization, use the Google Cloud console, gcloud CLI, or REST.

Permissions required for this task

To perform this task, you must have the following permissions:

Console
  1. Create a sole-tenant node group. For more information, see Create a sole-tenant node group.

  2. Configure the share settings by specifying one of the following in Configure share settings:

    If you don't want to share the node group, choose Do not share this node group with other projects.

gcloud

To create a shared node group, use the following gcloud compute sole-tenancy node-groups create command.

gcloud compute sole-tenancy node-groups create NODE_GROUP \
    --zone=ZONE \
    --node-template=NODE_TEMPLATE \
    --target-size=SIZE \
    --share-setting=SHARE_SETTING \
    --share-with=PROJECTS

Replace the following:

REST

To create a shared node group, use the following nodeGroups.insert method.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/ZONE/nodeGroups

{
  ...
  "name": NODE_GROUP,
  "nodeTemplate": NODE_TEMPLATE,
  "size": SIZE,
  "shareSettings": {
    "shareType": SHARE_TYPE,
    "projectMap": {
      string: {
        "projectId": PROJECTS
      },
    }
  }
  ...
}

Replace the following:

To provision a sole-tenant VM in a shared node group, use the Google Cloud console, gcloud CLI, or REST.

Console
  1. In the Google Cloud console, switch to a project that you've shared a node group with.

  2. Go to the VM instances page.

    Go to VM instances

  3. Click Create instance.

  4. In Zone, choose the zone of the shared node group.

  5. In Machine configuration > Series, choose the same machine type that the shared sole-tenant node group template specifies.

  6. Expand the Advanced options section.

  7. Expand the Sole-tenancy section.

  8. Click Browse.

  9. Choose Select project and specify the project that contains the shared node group.

  10. Choose the sole-tenant node group or a specific sole-tenant node in that group to provision the VM on.

gcloud

Provision a VM in a shared node group by using the node group name

To provision a sole-tenant VM in a shared node group by using the node group name, use the following gcloud compute instances create command.

gcloud compute instances create VM_NAME \
    --machine-type=MACHINE_TYPE \
    --node-group=NODE_GROUP \
    --node-project=NODE_PROJECT

Replace the following:

Provision a VM in a shared node group by using a node affinity file

To provision a sole-tenant VM in a shared node group by using a node affinity file, use the following gcloud compute instances create command.

gcloud compute instances create VM_NAME \
    --machine-type=MACHINE_TYPE \
    --node-affinity-file=NODE_AFFINITY_FILE

Replace the following:

REST

To provision a sole-tenant VM in a shared node group by using a node affinity file, use the following nodeGroups.insert method.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/ZONE/instances

{
  ...
  "name": VM_NAME,
  "machineType": MACHINE_TYPE,
  "scheduling": {
    ...
    "nodeAffinities": [
      {
        "key": KEY,
        "operator": OPERATOR,
        "values": [
          VALUE
        ]
      }
    ],
    ...
  },
  ...
}

Replace the following:

For more information about how to configure node affinity, see Configure node affinity labels.

View the sharing settings of a node group

To view the sharing settings of a node group, use the Google Cloud console, gcloud CLI, or REST.

Permissions required for this task

To perform this task, you must have the following permissions:

Console
  1. In the Google Cloud console, go to the Sole-tenant nodes page.

    Go to Sole-tenant nodes

  2. To view the properties of the node group, in the Name column, click the name of the node group.

gcloud

To view the sharing settings of a node group, use the following gcloud compute sole-tenancy node-groups describe command.

gcloud compute sole-tenancy node-groups describe NODE_GROUP

Replace NODE_GROUP with the name of the node group to view the sharing settings of.

REST

To view the sharing settings of a node group, use the following nodeGroups.get method.

GET https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/ZONE/nodeGroups

Replace the following:

To share an existing node group with other projects or the entire organization, use the Google Cloud console, gcloud CLI, or REST.

Permissions required for this task

To perform this task, you must have the following permissions:

Console
  1. In the Google Cloud console, go to the Sole-tenant nodes page.

    Go to Sole-tenant nodes

  2. In the Name column, click the name of the node group.

  3. To share the node group with all projects within the organization or with selected projects within the organization, in Overview > Shared with, click Edit edit.

gcloud

To update the sharing settings of a node group, use the following gcloud compute sole-tenancy node-groups update command.

gcloud compute sole-tenancy node-groups update NODE_GROUP \
    --zone=ZONE \
    --share-setting=SHARE_SETTING \
    --share-with=PROJECTS

Replace the following:

REST

To update the sharing settings of a node group, use the following nodeGroups.patch method.

PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/ZONE/nodeGroups/NODE_GROUP

{
  "shareSettings": {
    "shareType": SHARE_TYPE,
    "projectMap": {
      string: {
        "projectId": PROJECTS
      },
    }
  }
}

Replace the following:

Stop sharing a node group

To stop sharing a node group with other projects or the entire organization, use the gcloud CLI or REST.

Permissions required for this task

To perform this task, you must have the following permissions:

Console
  1. In the Google Cloud console, go to the Sole-tenant nodes page.

    Go to Sole-tenant nodes

  2. Click the Name of the node group.

  3. In Overview > Shared with, click Edit edit.

  4. To stop sharing, choose Do not share this node group with other projects.

gcloud

To stop sharing a node group with other projects or the entire organization, use the following gcloud compute sole-tenancy node-groups update command.

gcloud compute sole-tenancy node-groups update NODE_GROUP \
    --zone=ZONE \
    --share-setting=local

Replace the NODE_GROUP with the name of the node group to stop sharing.

REST

To stop sharing a node group with other projects or the entire organization, use the following nodeGroups.patch method.

PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/ZONE/nodeGroups/NODE_GROUP

{
  "shareSettings": {
    "shareType": LOCAL
  }
}

Replace the following:

To delete a shared node group from the owning project, use the Google Cloud console, gcloud CLI, or REST. Before deleting a node group, stop all VMs that are running in the node group.

Permissions required for this task

To perform this task, you must have the following permissions:

Console
  1. In the Google Cloud console, go to the Sole-tenant nodes page.

    Go to Sole-tenant nodes

  2. In the Name column, click the name of the node group.

  3. Click Delete.

gcloud

To delete a shared node group from the owning project, use the following gcloud compute sole-tenancy node-groups delete command.

gcloud compute sole-tenancy node-groups delete NODE_GROUP

Replace NODE_GROUP with the name of the node group to delete.

REST

To delete a shared node group from the owning project, use the following nodeGroups.delete method.

DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/ZONE/nodeGroups/NODE_GROUP

Replace the following:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4