kubernetes/kops · error

SizeGB must be at least 10 GB

Error message

SizeGB must be at least 10 GB

What it means

Volume.CheckChanges enforces the Linode platform minimum volume size of 10 GB when a new volume is created (no existing volume found). If the spec requests a SizeGB below 10, the task fails fast before calling the API.

Source

Thrown at upup/pkg/fi/cloudup/linodetasks/volume.go:118

			if fi.ValueOf(expected.SizeGB) < fi.ValueOf(actual.SizeGB) {
				return fmt.Errorf("SizeGB cannot be decreased")
			}
		}
		if changes.Tags != nil {
			return fi.CannotChangeField("Tags")
		}
	} else {
		if expected.Name == nil {
			return fi.RequiredField("Name")
		}
		if expected.Region == nil {
			return fi.RequiredField("Region")
		}
		if expected.SizeGB == nil {
			return fi.RequiredField("SizeGB")
		}
		if fi.ValueOf(expected.SizeGB) < 10 {
			return fmt.Errorf("SizeGB must be at least 10 GB")
		}
	}

	return nil
}

func (*Volume) RenderLinode(t *linode.APITarget, actual, expected, changes *Volume) error {
	if actual != nil {
		expected.ID = actual.ID
		if changes.SizeGB == nil {
			return nil
		}
		if err := t.Cloud.Client().ResizeVolume(context.Background(), fi.ValueOf(actual.ID), linodego.VolumeResizeOptions{Size: fi.ValueOf(expected.SizeGB)}); err != nil {
			return fmt.Errorf("error resizing Akamai (Linode) volume %q: %w", fi.ValueOf(actual.Name), err)
		}
		klog.V(2).Infof("Resized Akamai (Linode) volume %q (id=%d) to %d GB", fi.ValueOf(actual.Name), fi.ValueOf(actual.ID), fi.ValueOf(expected.SizeGB))
		return nil
	}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Set volumeSize (SizeGB) to 10 or greater in the spec
  2. If a variable feeds SizeGB, clamp it: max(10, size) before rendering the task
  3. Document/validate the minimum in your templates so it fails at validation time with a clearer message

Example fix

// before
volumeSize: 5
// after
volumeSize: 10  # Linode minimum is 10 GB
Defensive patterns

Strategy: validation

Validate before calling

const minLinodeVolumeGB = 10
if volumeSizeGB < minLinodeVolumeGB {
  return fmt.Errorf("volumeSize must be at least %d GB", minLinodeVolumeGB)
}

Prevention

When it happens

Trigger: In the create path of CheckChanges, expected.SizeGB is non-nil and fi.ValueOf(expected.SizeGB) < 10.

Common situations: A cluster spec or template was written with a small test value like 5 GB; a unit misinterpreted GiB vs GB; a variable default resolved to a too-small number.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/a8b23cb2fc6f0385. Report an issue: GitHub.