---
title: "Update Virtual Node Group"
method: PUT
path: "/ocean/azure/np/virtualNodeGroup/{virtualNodeGroupId}"
tags: ["Ocean AKS"]
---

# Update Virtual Node Group

`PUT /ocean/azure/np/virtualNodeGroup/{virtualNodeGroupId}`

Update a specified virtual node group in an Ocean cluster.
<br />
This API supports partial updates, so specific fields can be updated separately.

Notes:
<br />
When labels, tags and taints are updated the <b>existing</b> nodes are updated as well.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1ocean~1azure~1np~1virtualNodeGroup~1%7BvirtualNodeGroupId%7D/get/parameters/1` — unresolved $ref

## Request body

- object
  - `virtualNodeGroup` object, required
    - `name` string — Enter a name for the virtual node group.
    - `availabilityZones` string[] — An Array holding Availability Zones, this configures the availability zones the Ocean may launch instances in per VNG.
    - `nodePoolProperties` object — The Ocean Node Pool Properties.
      - `maxPodsPerNode` integer — The maximum number of pods per node in the node pools.
      - `enableNodePublicIP` boolean — enable node public IP.
      - `osDiskSizeGB` integer — The size of the OS disk in GB. For Linux OS, the minimum size is 32GB and for Windows OS the minimum is 128GB.
      - `osDiskType` 'Managed' | 'Ephemeral' — The type of the OS disk.
      - `osSKU` 'Ubuntu' | 'AzureLinux' | 'CBLMariner' | 'Windows2019' | 'Windows2022' — The OS SKU of the OS type. Must correlate with the os type.
      - `kubernetesVersion` string — The desired Kubernetes version of the luanched nodes. In case the value is null, the Kubernetes version of the control plane is used.
      - `vnetSubnetIDs` string[] — The IDs of subnets in an existing VNet into which to assign nodes in the cluster (requires azure network-plugin).
      - `podSubnetIDs` string[] — The IDs of subnets in an existing VNet into which to assign pods in the cluster (requires azure network-plugin).
      - `linuxOSConfig` object — Custom Linux OS configuration
        - `sysctls` object
          - `vmMaxMapCount` integer — Maximum number of memory map areas a process may have. Can be configured only if OS type is Linux.
      - `localDnsProfile` object — AKS LocalDNS profile configuration for the VNG. Requires VM sizes with at least 4 vCPUs and Linux (Ubuntu 22.04+ or Azure Linux) OS. See: https://learn.microsoft.com/en-us/azure/aks/localdns-custom
        - `mode` 'Required' | 'Preferred' | 'Disabled', required — The LocalDNS mode. Required when localDnsProfile is configured.
        - `vnetDNSOverrides` object — Per-zone DNS override configuration for VNet DNS resolution. Keys are DNS zone names (e.g. "." or "cluster.local"). Example: ```json { ".": { "queryLogging": "Error", "protocol": "PreferUDP", "forwardDestination": "VnetDNS", "forwardPolicy": "Sequential", "maxConcurrent": 1000, "cacheDurationInSeconds": 3600, "serveStaleDurationInSeconds": 3600, "serveStale": "Immediate" }, "cluster.local": { "queryLogging": "Error", "protocol": "ForceTCP", "forwardDestination": "ClusterCoreDNS", "forwardPolicy": "Sequential", "maxConcurrent": 1000, "cacheDurationInSeconds": 3600, "serveStaleDurationInSeconds": 3600, "serveStale": "Immediate" } } ```
        - `kubeDNSOverrides` object — Per-zone DNS override configuration for kube-dns/CoreDNS resolution. Keys are DNS zone names (e.g. "." or "cluster.local"). Example: ```json { ".": { "queryLogging": "Error", "protocol": "PreferUDP", "forwardDestination": "ClusterCoreDNS", "forwardPolicy": "Sequential", "maxConcurrent": 1000, "cacheDurationInSeconds": 3600, "serveStaleDurationInSeconds": 3600, "serveStale": "Immediate" }, "cluster.local": { "queryLogging": "Error", "protocol": "ForceTCP", "forwardDestination": "ClusterCoreDNS", "forwardPolicy": "Sequential", "maxConcurrent": 1000, "cacheDurationInSeconds": 3600, "serveStaleDurationInSeconds": 3600, "serveStale": "Immediate" } } ```
      - `encryptionAtHost` boolean — Whether to enable host-based encryption for nodes launched from this virtual node group. When set to true, use vmSizes.preferredVmSizes to provide compatible VM sizes. IMPORTANT: This setting is immutable at the Azure infrastructure level once nodes are launched. Changing this value requires a roll operation for new nodes to reflect the updated configuration.
    - `nodeCountLimits` object — Limit the number of nodes in a VNG.
      - `minCount` integer — Minimum node count limit.
      - `maxCount` integer — Maximum node count limit.
    - `strategy` object — The Ocean AKS Strategy object.
      - `shouldUtilizeCommitments` boolean — Determines whether to utilize any existing Azure Savings Plans or Reserved Instances associated with the subscription for On-Demand VMs.
      - `spotPercentage` integer — Percentage of spot VMs to maintain.
      - `fallbackToOd` boolean — If no spot instance markets are available, enable Ocean to launch on-demand instances instead.
      - `drainingTimeout` integer — Time in seconds to allow the node to drain before it is terminated.
    - `autoScale` object — Object specifying the automatic scaling of an Ocean VNG.
      - `autoHeadroomPercentage` integer — Optionally set a number between 0-200 to control the percentage of VNG resources dedicated to automatic headroom.
      - `headrooms` object[] — Specify the custom headroom per VNG. Provide a list of 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 — Amont of GPU to allocate for headroom unit.
        - `numOfUnits` integer — The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
    - `labels` object — key-value pairs 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.\ The following are not allowed: * "kubernetes.azure.com/agentpool" * "kubernetes.io/arch"* "kubernetes.io/os" * "node.kubernetes.io/instance-type" * "topology.kubernetes.io/region" * "topology.kubernetes.io/zone" * "kubernetes.azure.com/cluster" * "kubernetes.azure.com/mode" * "kubernetes.azure.com/role" * "kubernetes.azure.com/scalesetpriority" * "kubernetes.io/hostname" * "kubernetes.azure.com/storageprofile" * "kubernetes.azure.com/storagetier" * "kubernetes.azure.com/instance-sku" * "kubernetes.azure.com/node-image-version" * "kubernetes.azure.com/subnet" * "kubernetes.azure.com/vnet" * "kubernetes.azure.com/ppg" * "kubernetes.azure.com/encrypted-set" * "kubernetes.azure.com/accelerator" * "kubernetes.azure.com/fips_enabled" * "kubernetes.azure.com/os-sku"
    - `taints` object[] — Add taints to a virtual node group.
      - `key` string — Set taint key. The following are not allowed: * "kubernetes.azure.com/scalesetpriority"
      - `value` string — Set taint value.
      - `effect` 'NoSchedule' | 'PreferNoSchedule' | 'NoExecute' | 'PreferNoExecute' — Set taint effect.
    - `tags` object — A maximum of 20 unique key-value pairs for VM tags in the virtual node group. Note: Azure has a tag limit of 50 per node pool.
    - `vmSizes` object — The Ocean AKS VM Sizes object.
      - `preferredVmSizes` string[] — Preferred VM sizes for this virtual node group. Used when nodePoolProperties.encryptionAtHost is true to constrain launches to compatible sizes.
      - `filters` object — Filters for the VM sizes that can be launched from the virtual node group.
        - `minVCpu` integer — Minimum number of vcpus available.
        - `maxVCpu` integer — Maximum number of vcpus available.
        - `minMemoryGiB` number, float — Minimum amount of Memory (GiB).
        - `maxMemoryGiB` number, float — Maximum amount of Memory (GiB).
        - `architectures` string[] — The filtered vm sizes will support at least one of the architectures from this list. x86_64 includes both intel64 and amd64.
        - `series` string[] — Only vm sizes belonging to a series from the list will be available for scaling.
        - `excludeSeries` string[] — Vm sizes belonging to a series from the list will not be available for scaling.
        - `minDisk` integer — Minimum number of data disks available.
        - `minGpu` number, double — Minimum number of GPUs available.
        - `maxGpu` number, double — Maximum number of GPUs available.
        - `diskPerformance` 'Standard' | 'Premium' — The filtered vm sizes will support at least one of the classes from this list.
        - `acceleratedNetworking` 'Enabled' | 'Disabled' — In case acceleratedNetworking is set to Enabled, accelerated networking applies only to the VM that enables it.
        - `minNICs` integer — Minimum number of network interfaces.
        - `vmTypes` string[] — The filtered vm types will belong to one of the vm types from this list.
        - `gpuTypes` string[] — The filtered gpu types will belong to one of the gpu types from this list.
    - `scheduling` object — An object used to specify times when the virtual node group will turn off all its node pools. Once the shutdown time will be over, the virtual node group will return to its previous state.
      - `shutdownHours` object — An object used to specify times that the nodes in the virtual node group will be stopped.
        - `timeWindows` string[] — The times that the shutdown hours will apply. Required if isEnabled is true.
        - `isEnabled` boolean — Flag to enable or disable the shutdown hours mechanism. When False, the mechanism is deactivated, and the virtual node gorup remains in its current state.
    - `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.

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