{"record":{"id":"8f24b6f9ed09d14b","repo":"kubernetes/kops","slug":"didn-t-find-k8s-instancegroup-for-tag-v","errorCode":null,"errorMessage":"Didn't find k8s-instancegroup for tag %v","messagePattern":"Didn't find k8s-instancegroup for tag (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/do/cloud.go","lineNumber":483,"sourceCode":"\n\tklog.V(8).Infof(\"InstanceGroup Info = %v\", result)\n\n\treturn result, nil\n}\n\nfunc getDropletInstanceGroup(tags []string) (string, error) {\n\tfor _, tag := range tags {\n\t\tklog.V(8).Infof(\"Check tag = %s\", tag)\n\t\tif strings.Contains(strings.ToLower(tag), TagKubernetesInstanceGroup) {\n\t\t\ttagParts := strings.Split(tag, \":\")\n\t\t\tif len(tagParts) < 2 {\n\t\t\t\treturn \"\", fmt.Errorf(\"tag split failed, too few components for tag %q\", tag)\n\t\t\t}\n\t\t\treturn tagParts[1], nil\n\t\t}\n\t}\n\n\treturn \"\", fmt.Errorf(\"Didn't find k8s-instancegroup for tag %v\", tags)\n}\n\n// matchInstanceGroup filters a list of instancegroups for recognized cloud groups\nfunc matchInstanceGroup(name string, clusterName string, instancegroups []*kops.InstanceGroup) (*kops.InstanceGroup, error) {\n\tvar instancegroup *kops.InstanceGroup\n\tfor _, g := range instancegroups {\n\t\tvar groupName string\n\n\t\tswitch {\n\t\tcase g.Spec.Role.HasControlPlane(),\n\t\t\tg.Spec.Role.HasNode():\n\t\t\tgroupName = clusterName + \"-\" + g.ObjectMeta.Name\n\t\tdefault:\n\t\t\tklog.Warningf(\"Ignoring InstanceGroup of unknown role %q\", g.Spec.Role)\n\t\t\tcontinue\n\t\t}\n\n\t\tif name == groupName {","sourceCodeStart":465,"sourceCodeEnd":501,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/do/cloud.go#L465-L501","documentation":"Sentinel-style validation in getDropletInstanceGroup: none of the droplet's tags contain the k8s-instancegroup marker, so its instance group membership cannot be determined. The droplet is effectively unclassified for cluster grouping purposes.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/do/cloud.go:483 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Apply the k8s-instancegroup:<name> tag to the droplet","Recreate the droplet through kops so tags are set correctly","Verify droplet tags with `doctl compute droplet get`"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}