---
title: "Update VNG"
method: PUT
path: "/ocean/gcp/k8s/launchSpec/{launchSpecId}"
tags: ["Ocean GKE"]
---

# Update VNG

`PUT /ocean/gcp/k8s/launchSpec/{launchSpecId}`

All Ocean parameters in a virtual node group are updatable.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1ocean~1aws~1ecs~1launchSpec~1%7BlaunchSpecId%7D/get/parameters/1` — unresolved $ref

## Request body

- object — 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[] — 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` object — List of filters. The Instance types that match with all filters compose the Ocean's whitelist parameter. Cannot be configured together with whitelist/blacklist.
    - `minVcpu` integer — Minimum number of vcpus available.
    - `maxVcpu` integer — Maximum number of vcpus available.
    - `minMemoryGiB` number, double — Minimum amount of Memory (GiB).
    - `maxMemoryGiB` number, double — Maximum amount of Memory (GiB).
    - `includeFamilies` string[] — Types belonging to a family from the IncludeFamilies will be available for scaling (asterisk wildcard is also supported).
    - `excludeFamilies` string[] — Types belonging to a family from the ExcludeFamilies will not be available for scaling (asterisk wildcard is also supported).
  - `preferredTypes` string[] — When Ocean scales up VMs, it prioritizes the preferred instance types for launching new nodes. If launching nodes from this preferred list is not feasible, Ocean will then proceed to utilize the configured instance types available within the cluster. Note that the preferred types must be a subset of the instance types configured for the cluster/vng.
  - `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` object — The Ocean shielded instance configuration object.
    - `enableSecureBoot` boolean — Enable the secure boot parameter on the GCP instances.
    - `enableIntegrityMonitoring` boolean — Enable the integrity monitoring parameter on the GCP instances.
  - `strategy` object — The Ocean virtual node group strategy object.
    - `preemptiblePercentage` integer — The desired percentage of Spot/Preemptible instances out of all running instances for this VNG.\ Only available when the field is **not** set in the cluster directly (cluster.strategy.preemptiblePercentage).
    - `scalingOrientation` 'COST' | 'AVAILABILITY' | 'BALANCED' — Set this value to control the approach that Ocean takes when launching nodes.
    - `shouldUtilizeCommitments` boolean — Enable committed use discounts utilization.
    - `revertToPreferred` object — Allow the replacement of instances to Preferred ones if available.
      - `shouldPerform` boolean — If enabled, replacements will be performed for your VNG. TRUE is the default.
      - `maxBatchPercentage` integer — Decide on the % of instances that will be replaced simultaneously.
  - `storage` object — The Ocean virtual node group storage object.
    - `localSsdCount` integer — Defines the number of local SSDs to be attached per node for this VNG. If instanceTypes are configured in this VNG, **all of them** must support the value of localSsdCount. Otherwise, if the Ocean cluster has instanceTypes on a permit list, **at least one** must support the value of localSsdCount. For more information about local SSDs, it is recommended to review the GCP documentation: * [GCP Local SSD](https://cloud.google.com/compute/docs/disks#localssds) * [Local SSDs and machine types](https://cloud.google.com/compute/docs/disks#local_ssd_machine_type_restrictions) * [GKE Using local SSDs](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd#use)
    - `localSsdEphemeralStorageCount` integer — Defines the number of local SSDs to be used as ephemeral storage per node for this VNG. This field is derived from nodes enabled with the `--ephemeral-storage-local-ssd` flag in GKE, which configures ephemeral storage (used for temporary data such as container images and writable layers) backed by local SSDs instead of the boot disk. **All** instanceTypes configured in this VNG must support the value of localSsdEphemeralStorageCount. Otherwise, if the Ocean cluster has instanceTypes on a permit list, **at least one** must support the value of localSsdEphemeralStorageCount. For more information about local SSDs with ephemeral storage, it is recommended to review the GCP documentation: * [GKE ephemeral storage backed by local SSDs](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd#lssd-ephemeral-storage)
    - `localNvmeSsdCount` integer — Defines the number of local NVMe SSDs to be attached per node in raw block mode for this VNG. This field is derived from nodes enabled with the `--local-nvme-ssd-block` flag in GKE, which attaches local NVMe SSDs as raw block devices, providing the highest possible storage performance. **All** instanceTypes configured in this VNG must support the value of localNvmeSsdCount. Otherwise, if the Ocean cluster has instanceTypes on a permit list, **at least one** must support the value of localNvmeSsdCount. For more information about local NVMe SSDs, it is recommended to review the GCP documentation: * [GKE local NVMe SSD block storage](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd-raw)
  - `scheduling` object — An object used to define scheduled tasks such as a manual headroom update or a VNG-level shutdown window.
    - `shutdownHours` object — An object used to specify times that the nodes in the virtual node group will be taken down.
      - `isEnabled` boolean — Flag to enable or disable the shutdown hours mechanism. When False, the mechanism is deactivated, and the virtual node group remains in its current state.
      - `timeWindows` string[], required — The times that the shutdown hours will apply.
    - `tasks` object[]
      - `isEnabled` boolean, required — Describes whether the task is enabled. When True, the task runs. When False, it does not run. Required for launchSpec.scheduling.tasks. In case automatic headroom is configured, please make sure to set autoScaler.enableAutomaticAndManualHeadroom on Ocean level to true in order to make sure that the manual headroom would be affective.
      - `cronExpression` string, required — A valid cron expression. For example : " * * * * * ". The cron job runs in UTC time and is in Unix cron format. (See the Cron Expression Validator Script.)
      - `taskType` 'manualHeadroomUpdate', required — The activity that you are scheduling. Valid values: "manualHeadroomUpdate". Required for launchSpec.scheduling.tasks.
      - `config` object — The config of this scheduled task. Depends on the value of `taskType`.
        - `headrooms` object[], required — Set custom headroom per VNG. 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.
          - `numOfUnits` integer — The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
          - `gpuPerUnit` integer — Amont of GPU to allocate for headroom unit.
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## 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)
