{"record":{"id":"5fbf2ff2a1d531ae","repo":"kubernetes/kops","slug":"digital-ocean-cloud-provider-does-not-support-dele","errorCode":null,"errorMessage":"digital ocean cloud provider does not support deleting cloud groups at this time","messagePattern":"digital ocean cloud provider does not support deleting cloud groups at this time","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/do/cloud.go","lineNumber":124,"sourceCode":"\n\ttokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: accessToken})\n\tclient := godo.NewClient(oauth2.NewClient(context.TODO(), tokenSource))\n\n\treturn &doCloudImplementation{\n\t\tClient: client,\n\t\tdns:    dns.NewProvider(client),\n\t\tregion: region,\n\t}, nil\n}\n\nfunc (c *doCloudImplementation) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error) {\n\treturn getCloudGroups(c, cluster, instancegroups, warnUnmatched, nodes)\n}\n\n// DeleteGroup is not implemented yet, is a func that needs to delete a DO instance group.\nfunc (c *doCloudImplementation) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error {\n\tklog.V(8).Info(\"digitalocean cloud provider DeleteGroup not implemented yet\")\n\treturn fmt.Errorf(\"digital ocean cloud provider does not support deleting cloud groups at this time\")\n}\n\n// DeregisterInstance drains a cloud instance and loadbalancers.\nfunc (c *doCloudImplementation) DeregisterInstance(i *cloudinstances.CloudInstance) error {\n\tklog.V(8).Info(\"DO DeregisterInstance not implemented\")\n\treturn nil\n}\n\nfunc (c *doCloudImplementation) DeleteInstance(i *cloudinstances.CloudInstance) error {\n\tdropletID, err := strconv.Atoi(i.ID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to convert droplet ID to int: %s\", err)\n\t}\n\n\t_, _, err = c.Client.DropletActions.Shutdown(context.TODO(), dropletID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error stopping instance %d: %v\", dropletID, err)\n\t}","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/do/cloud.go#L106-L142","documentation":"The DigitalOcean cloud implementation does not implement DeleteGroup for instance groups; calling it (e.g. `kops delete instancegroup` or rolling-update flows that need to remove a group) always returns this explicit unsupported-operation error. The klog.V(8) message explicitly says the feature is not implemented yet.","triggerScenarios":"Invoking any kOps operation that removes a cloud instance group on a DigitalOcean cluster: `kops delete instancegroup <name> --yes`, or rolling update withsurge/remove flows that require deleting a group.","commonSituations":"User tries to scale down by deleting an instance group on a DO cluster; automation built for AWS clusters applied unchanged to DO clusters.","solutions":["Do not delete instance groups on DO clusters; instead reduce the group to minSize 0 via `kops set instancegroup`/spec edit and update, or delete the droplets directly in the DO console","Perform group removal manually: delete droplets with doctl, edit the cluster spec to remove the InstanceGroup, then `kops update cluster`","Track upstream kOps for DO DeleteGroup implementation and upgrade when available","Use a provider with full group lifecycle support (AWS/GCP) if deleting groups is a hard requirement"],"exampleFix":"// before\nkops delete instancegroup nodes --yes   # fails on DO\n// after\n# scale the group down instead\nkops set instancegroup nodes cluster.example.com --count 0\nkops update cluster --yes\n# then remove the group from the spec manually once droplets are gone","handlingStrategy":"validation","validationCode":"if cloud.ProviderID() == \"digitalocean\" && operation == \"delete-instancegroup\" {\n    return errors.New(\"DO does not support deleting cloud groups; scale to 0 instead\")\n}","typeGuard":null,"tryCatchPattern":"if err := c.DeleteGroup(g); err != nil {\n    if strings.Contains(err.Error(), \"does not support deleting cloud groups\") {\n        return fallbackScaleToZero(g) // reduce group count instead\n    }\n    return err\n}","preventionTips":["Never run AWS-style group deletion automation against DO clusters","Scale instance groups down (count 0) instead of deleting them on DO","Check provider feature parity docs before scripting cluster lifecycle ops","Track kOps releases for DO DeleteGroup support"],"tags":["digitalocean","unimplemented","instance-groups"],"backgroundTag":"operation-not-supported-provider","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}