kubernetes/kops · error
error building complete spec: %v
Error message
error building complete spec: %v
What it means
Assembling the fully-defaulted cluster spec from the input spec and all component options builders failed. The wrapped error identifies which builder/defaulting step broke; this is a spec-construction failure, not a cloud API failure.
Source
Thrown at upup/pkg/fi/cloudup/populate_cluster_spec.go:345
codeModels = append(codeModels, &components.AWSOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.AWSEBSCSIDriverOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.AWSCloudControllerManagerOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.GCPCloudControllerManagerOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.GCPPDCSIDriverOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.AzureCloudControllerManagerOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.HetznerCloudControllerManagerOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.LinodeCloudControllerManagerOptionsBuilder{OptionsContext: optionsContext})
codeModels = append(codeModels, &components.KarpenterOptionsBuilder{Context: optionsContext})
}
}
specBuilder := &SpecBuilder{
OptionsLoader: loader.NewClusterOptionsLoader(codeModels),
}
completed, err := specBuilder.BuildCompleteSpec(cluster)
if err != nil {
return fmt.Errorf("error building complete spec: %v", err)
}
// TODO: This should not be needed...
completed.Spec.Networking.Topology = c.InputCluster.Spec.Networking.Topology
// completed.Topology.Bastion = c.InputCluster.Spec.Topology.Bastion
if errs := validation.ValidateCluster(completed, true, clientset.VFSContext()); len(errs) != 0 {
return fmt.Errorf("completed cluster failed validation: %v", errs.ToAggregate())
}
c.fullCluster = completed
return nil
}
func (c *populateClusterSpec) assignSubnets(cluster *kopsapi.Cluster) error {
if cluster.Spec.Networking.NonMasqueradeCIDR == "" {
klog.Warningf("NonMasqueradeCIDR not set; can't auto-assign dependent subnets")
return nilView on GitHub (pinned to 4c8573c808)
Solutions
- Read the wrapped error to find the failing options builder
- Fix the corresponding field in the cluster or instance group spec
- Retry spec population
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/populate_cluster_spec.go:345 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/6f430c26b6dae67a.
Report an issue: GitHub.