{"record":{"id":"068a6d1f9e3dd60f","repo":"kubernetes/kops","slug":"providerid-was-not-set-for-node-s","errorCode":null,"errorMessage":"providerID was not set for node %s","messagePattern":"providerID was not set for node (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/aws/identify.go","lineNumber":94,"sourceCode":"\n\treturn &nodeIdentifier{\n\t\tec2Client:    ec2Client,\n\t\tcache:        expirationcache.NewTTLStore(stringKeyFunc, cacheTTL),\n\t\tcacheEnabled: cacheNodeidentityInfo,\n\t}, nil\n}\n\n// stringKeyFunc is a string as cache key function\nfunc stringKeyFunc(obj interface{}) (string, error) {\n\tkey := obj.(*nodeidentity.Info).InstanceID\n\treturn key, nil\n}\n\n// IdentifyNode queries AWS for the node identity information\nfunc (i *nodeIdentifier) IdentifyNode(ctx context.Context, node *corev1.Node) (*nodeidentity.Info, error) {\n\tproviderID := node.Spec.ProviderID\n\tif providerID == \"\" {\n\t\treturn nil, fmt.Errorf(\"providerID was not set for node %s\", node.Name)\n\t}\n\tif !strings.HasPrefix(providerID, \"aws://\") {\n\t\treturn nil, fmt.Errorf(\"providerID %q not recognized for node %s\", providerID, node.Name)\n\t}\n\n\ttokens := strings.Split(strings.TrimPrefix(providerID, \"aws://\"), \"/\")\n\tif len(tokens) != 3 {\n\t\treturn nil, fmt.Errorf(\"providerID %q not recognized for node %s\", providerID, node.Name)\n\t}\n\n\t// zone := tokens[1]\n\tinstanceID := tokens[2]\n\n\t// If caching is enabled try pulling nodeidentity.Info from cache before\n\t// doing a EC2 API call.\n\tif i.cacheEnabled {\n\t\tobj, exists, err := i.cache.GetByKey(instanceID)\n\t\tif err != nil {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/aws/identify.go#L76-L112","documentation":"IdentifyNode was asked to identify a Kubernetes Node whose spec.providerID is empty. The AWS identifier requires a provider ID of the form aws:///<zone>/<instance-id> to locate the instance, so node registration fails until the cloud-provider sets it.","triggerScenarios":"Thrown at pkg/nodeidentity/aws/identify.go:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the AWS cloud-provider (kubelet --cloud-provider=aws / external CCM) is configured so it stamps node.spec.providerID","Wait for node registration to complete before node-identity lookups","If nodes are imported, patch node.spec.providerID with the correct aws:///<zone>/<instance-id> value"],"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-12T12:17:11.808Z"}