kubernetes/kops · error
Error listing endpoints: %v
Error message
Error listing endpoints: %v
What it means
handleListDiscoveryEndpoints lists DiscoveryEndpoints from the store for the universe (then filters by namespace if present). A store-level failure is surfaced as 500 'Error listing endpoints: <err>'. Client-side routing/certs are fine; the failure is in the persistence layer.
Source
Thrown at discovery/pkg/discovery/server.go:133
{
Name: "discoveryendpoints",
SingularName: "discoveryendpoint",
Namespaced: true,
Kind: "DiscoveryEndpoint",
Verbs: []string{"get", "list", "create", "update", "patch"},
},
},
}
s.writeJSON(w, http.StatusOK, resp)
}
func (s *Server) handleListDiscoveryEndpoints(w http.ResponseWriter, r *http.Request, _ *UserInfo) {
universeID := r.PathValue("universe")
ns := r.PathValue("namespace") // Empty if not in path
endpoints, err := s.Store.ListDiscoveryEndpoints(r.Context(), universeID)
if err != nil {
http.Error(w, fmt.Sprintf("Error listing endpoints: %v", err), http.StatusInternalServerError)
return
}
resp := api.DiscoveryEndpointList{
TypeMeta: metav1.TypeMeta{Kind: "DiscoveryEndpointList", APIVersion: "discovery.kops.k8s.io/v1alpha1"},
}
for _, ep := range endpoints {
if ns == "" || ep.ObjectMeta.Namespace == ns {
resp.Items = append(resp.Items, *ep)
}
}
s.writeJSON(w, http.StatusOK, resp)
}
func (s *Server) handleCreateDiscoveryEndpoint(w http.ResponseWriter, r *http.Request, userInfo *UserInfo) {
universeID := r.PathValue("universe")View on GitHub (pinned to 4c8573c808)
Solutions
- Read the server log / response body for the underlying store error.
- Verify the store backend is healthy and reachable.
- Confirm the universe ID in the path exists in the store.
- Retry after fixing backend; check store credentials/permissions.
Defensive patterns
Strategy: retry
Try / catch
resp, err := client.Get(listURL)
if err == nil && resp.StatusCode == http.StatusInternalServerError {
time.Sleep(backoff)
return retry()
} Prevention
- Verify the universe exists before listing
- Monitor store backend health
- Check store credentials as part of deployment
When it happens
Trigger: GET /{universe}/apis/discovery.kops.k8s.io/v1alpha1/discoveryendpoints (with or without /namespaces/{namespace}) where Store.ListDiscoveryEndpoints errors: backend down, invalid universe record, permissions, or data error.
Common situations: Store database outage; wrong/unknown universe in URL; expired DB credentials; kubectl-style discovery requests during backend maintenance.
Related errors
- Error listing endpoints: %v
- Error creating endpoint: %v
- Error applying endpoint: %v
- Error getting endpoint: %v
- error reading addons from %q: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/6476709e8564c14e.
Report an issue: GitHub.