kubernetes/kops · error
parsing providerID %q: %w
Error message
parsing providerID %q: %w
What it means
In the GCE IPAM reconciler, the node's providerID (e.g. gce://project/zone/instance) failed to parse as a URL. The value present on the Node object is malformed, so its project/zone/instance components cannot be extracted for the GCE API call.
Source
Thrown at cmd/kops-controller/controllers/gceipam.go:103
// we'll ignore not-found errors, since they can't be fixed by an immediate
// requeue (we'll need to wait for a new notification), and we can get them
// on deleted requests.
return ctrl.Result{}, nil
}
return ctrl.Result{}, err
}
if len(node.Spec.PodCIDRs) == 0 {
// CCM Node Controller has not done its thing yet
if node.Spec.ProviderID == "" {
klog.Infof("node %q has empty provider ID", node.Name)
return ctrl.Result{}, nil
}
// e.g. providerID: gce://example-project-id/us-west2-a/instance-id
providerURL, err := url.Parse(node.Spec.ProviderID)
if err != nil {
return ctrl.Result{}, fmt.Errorf("parsing providerID %q: %w", node.Spec.ProviderID, err)
}
tokens := strings.Split(strings.Trim(providerURL.Path, "/"), "/")
if len(tokens) != 2 {
return ctrl.Result{}, fmt.Errorf("unexpected format for providerID %q", node.Spec.ProviderID)
}
project := providerURL.Host
zone := tokens[0]
instanceID := tokens[1]
if project == "" || zone == "" || instanceID == "" {
return ctrl.Result{}, fmt.Errorf("unexpected format for providerID %q", node.Spec.ProviderID)
}
instance, err := r.gceClient.Instances.Get(project, zone, instanceID).Context(ctx).Do()
if err != nil {
return ctrl.Result{}, fmt.Errorf("getting instance %s/%s/%s: %w", project, zone, instanceID, err)
}
var ipv6Addresses []stringView on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the node's spec.providerID value in the cluster
- Correct or clear the malformed providerID so the CCM can repopulate it
- Check whether an external actor wrote an invalid providerID
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cmd/kops-controller/controllers/gceipam.go:103 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/6c55c7e44f142aa7.
Report an issue: GitHub.