kubernetes/kops · error

error building security groups

Error message

error building security groups: %v

What it means

Resolving the elastigroup's security groups failed; mapping the instance group's role and stack to security group tasks produced an error, with the cause in the wrapped error.

Solutions

  1. Check the wrapped error and the cluster's security group settings
  2. Verify the instance group's subnets/zones are consistent
  3. Re-run kops update
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at pkg/model/awsmodel/spotinst.go:299 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at pkg/model/awsmodel/spotinst.go:299

	if err != nil {
		return fmt.Errorf("error building iam instance profile: %v", err)
	}

	// Root volume.
	group.RootVolumeOpts, err = b.buildRootVolumeOpts(ig)
	if err != nil {
		return fmt.Errorf("error building root volume options: %v", err)
	}

	// Tenancy.
	if ig.Spec.Tenancy != "" {
		group.Tenancy = new(ig.Spec.Tenancy)
	}

	// Security groups.
	group.SecurityGroups, err = b.buildSecurityGroups(c, ig)
	if err != nil {
		return fmt.Errorf("error building security groups: %v", err)
	}

	// SSH key.
	group.SSHKey, err = b.LinkToSSHKey()
	if err != nil {
		return fmt.Errorf("error building ssh key: %v", err)
	}

	// Load balancers.
	group.LoadBalancers, group.TargetGroups, err = b.buildLoadBalancers(c, ig)
	if err != nil {
		return fmt.Errorf("error building load balancers: %v", err)
	}

	// User data.
	group.UserData, err = b.BootstrapScriptBuilder.ResourceNodeUp(c, ig)
	if err != nil {
		return fmt.Errorf("error building user data: %v", err)

View on GitHub (pinned to 4c8573c808)