kubernetes/kops · error
failed to create cloud instance for server %s(%s): %w
Error message
failed to create cloud instance for server %s(%s): %w
What it means
In buildCloudGroup, NewCloudInstance rejected the server (duplicate ID, nil nodeMap entry issue, or invalid status) while mapping a Scaleway server to a kops CloudInstance. The server name and ID pinpoint the offending machine in the group being built.
Source
Thrown at upup/pkg/fi/cloudup/scaleway/cloud.go:406
cloudInstanceGroup := &cloudinstances.CloudInstanceGroup{
HumanName: ig.Name,
InstanceGroup: ig,
Raw: sg,
MinSize: int(fi.ValueOf(ig.Spec.MinSize)),
TargetSize: int(fi.ValueOf(ig.Spec.MinSize)),
MaxSize: int(fi.ValueOf(ig.Spec.MaxSize)),
}
for _, server := range sg {
status := cloudinstances.CloudInstanceStatusUpToDate
for _, tag := range server.Tags {
if tag == TagNeedsUpdate {
status = cloudinstances.CloudInstanceStatusNeedsUpdate
}
}
cloudInstance, err := cloudInstanceGroup.NewCloudInstance(server.ID, status, nodeMap[server.ID])
if err != nil {
return nil, fmt.Errorf("failed to create cloud instance for server %s(%s): %w", server.Name, server.ID, err)
}
cloudInstance.State = cloudinstances.State(server.State)
cloudInstance.MachineType = server.CommercialType
cloudInstance.Roles = append(cloudInstance.Roles, InstanceRoleFromTags(server.Tags))
ip, err := s.GetServerIP(server.ID, server.Zone)
if err != nil {
return nil, fmt.Errorf("getting server IP: %w", err)
}
cloudInstance.PrivateIP = ip
}
return cloudInstanceGroup, nil
}
func (s *scwCloudImplementation) GetClusterDNSRecords(clusterName string) ([]*domain.Record, error) {
names := strings.SplitN(clusterName, ".", 2)
clusterNameShort := names[0]
domainName := names[1]View on GitHub (pinned to 4c8573c808)
Solutions
- Check for duplicate server IDs in the Scaleway server group
- Verify the server still exists and is not in a transitional state
- Remove or recreate the offending server if its state is inconsistent
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/scaleway/cloud.go:406 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/e526e3216c1c8521.
Report an issue: GitHub.