---
title: "Create VNG"
method: POST
path: "/ocean/gcp/k8s/launchSpec"
tags: ["Ocean GKE"]
---

# Create VNG

`POST /ocean/gcp/k8s/launchSpec`

Create a Virtual Node Group.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1ocean~1aws~1k8s~1launchSpec/post/parameters/1` — unresolved $ref

## Request body

- object
  - `launchSpec` object, required — Ocean Cluster Virtual Node Group (VNG).
    - `oceanId` string, required — The Ocean cluster identifier. Required to create the virtual node group.
    - `name` string — Set the name for the virtual node group.
    - `sourceImage` string, required — Set the image URL. Can be null.
    - `serviceAccount` string — The account used by applications running on the VM to call GCP APIs.
    - `rootVolumeSizeInGb` integer — Set root volume size (in GB).
    - `rootVolumeType` 'pd-standard' | 'pd-ssd' | 'pd-balanced' | 'pd-extreme' | 'hyperdisk-balanced' | 'hyperdisk-balanced-high-availability' — Set the root volume disk type.
    - `metadata` object[], required — Add metadata to the cluster.
      - `key` string, required — Set the metadata key. Required for launchSpec.metadata.
      - `value` string, required — Set the metadata name. Required for launchSpec.metadata.
    - `instanceTypes` string[] — An array of supported machine types for the virtual node group. Can be null.
    - `filters` Filters — unresolved $ref
    - `preferredTypes` PreferredTypes — unresolved $ref
    - `availabilityZones` string[] — An array holding availability zones, this configures the availability zones the Ocean may launch instances in per VNG. Can be null.
    - `tags` string[] — Every node launched from this VNG will have those tags. If the value is null, the nodes will have the tags configured at the cluster level.
    - `taints` object[] — Add taints to the virtual node group.
      - `key` string, required — Set taint key.
      - `value` string, required — Set taint value.
      - `effect` string, required — Set taint effect.
    - `labels` object[] — An array of labels to add to the virtual node group. Only custom user labels are allowed, and not Kubernetes built-in labels or Spot internal labels.
      - `key` string, required — Set label key.\ The following are not allowed: * "kubernetes.io/hostname" * "failure-domain.beta.kubernetes.io/zone" * "topology.kubernetes.io/zone" * "failure-domain.beta.kubernetes.io/region" * "topology.kubernetes.io/region" * "beta.kubernetes.io/instance-type" * "node.kubernetes.io/instance-type" * "beta.kubernetes.io/os" * "kubernetes.io/os" * "beta.kubernetes.io/arch" * "kubernetes.io/arch" * "spotinst.io/node-lifecycle" * "spotinst.io/gpu-type"
      - `value` string, required — Set label value.
    - `autoScale` object — Object specifying the automatic scaling of an Ocean VNG.
      - `headrooms` object[] — Set custom headroom per virtual node group. Provide a list of launchSpec.autoScale.headroom objects.
        - `cpuPerUnit` integer — Configure the number of CPUs to allocate the headroom. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.
        - `memoryPerUnit` integer — Configure the amount of memory (MiB) to allocate the headroom.
        - `gpuPerUnit` integer — The amount of GPU to allocate per headroom unit.
        - `numOfUnits` integer, required — The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
      - `autoHeadroomPercentage` integer — Number between 0-200 to control the headroom % of the specific Virtual Node Group. Effective when cluster.autoScaler.isAutoConfig=true is set on the Ocean cluster
      - `down` object — Autoscaling scale down operations.
        - `maxScaleDownPercentage` number, double — The maximum percentage allowed to scale down in a single scaling action on the nodes running in a specific VNG. Allowed only if maxScaleDownPercentage is set to null at the cluster level.
    - `resourceLimits` object
      - `maxInstanceCount` integer — Option to set a maximum number of instances per virtual node group. Can be null. If set, the value must be greater than or equal to 0.
      - `minInstanceCount` integer — Option to set a minimum number of instances per virtual node group.\ Can be null. If set, value must be greater than or equal to 0.
    - `restrictScaleDown` boolean — When set to True, VNG nodes will be treated as if all pods running have the [restrict-scale-down label](https://docs.flexera.com/spot/ocean/features/labels-and-taints). Therefore, Ocean will not scale nodes down unless they are empty.
    - `shieldedInstanceConfig` ShieldedInstanceConfig — unresolved $ref
    - `strategy` Strategy — unresolved $ref
    - `storage` Storage — unresolved $ref
    - `scheduling` Scheduling — unresolved $ref
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `networkInterfaces` object[] — Settings for network interfaces
      - `network` string, required — The name of the network.
      - `projectId` string — Use a network resource from a different project. Set the project identifier to use its network resource. This parameter is relevant only if the network resource is in a different project.
      - `accessConfigs` object[] — The network protocol of the VNG.
        - `name` string — The name of the access configuration.
        - `type` 'ONE_TO_ONE_NAT' — The type of the access configuration.
      - `aliasIpRanges` object[] — use the imported node pool’s associated aliasIpRange to assign secondary IP addresses to the nodes. Cannot be changed after VNG creation.
        - `ipCidrRange` string, required — specify the IP address range in CIDR notation that can be used for the alias IP addresses associated with the imported node pool.
        - `subnetworkRangeName` string, required — specify the IP address range for the subnet secondary IP range.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
