kubernetes/kops · error

Error listing endpoints: %v

Error message

Error listing endpoints: %v

What it means

In handleOIDCDiscovery, s.Store.ListDiscoveryEndpoints failed while enumerating DiscoveryEndpoint objects for the universe. The server returns 500 with the underlying store error embedded in the message. This is a backend/storage failure, not a client error.

Source

Thrown at discovery/pkg/discovery/oidc.go:44

	api "k8s.io/kops/discovery/apis/discovery.kops.k8s.io/v1alpha1"
)

func (s *Server) handleOIDCDiscovery(w http.ResponseWriter, r *http.Request) {
	ctx := r.Context()
	log := klog.FromContext(ctx)

	universeID := r.PathValue("universe")

	host := r.Host
	if host == "" {
		log.Info("Cannot determine host for OIDC discovery")
		http.Error(w, "Cannot determine host", http.StatusBadRequest)
		return
	}

	endpoints, err := s.Store.ListDiscoveryEndpoints(r.Context(), universeID)
	if err != nil {
		http.Error(w, fmt.Sprintf("Error listing endpoints: %v", err), http.StatusInternalServerError)
		return
	}

	issuerURL := "https://" + host + "/" + universeID + "/"

	var oidcSpec *api.OIDCSpec
	for _, ep := range endpoints {
		if ep.Spec.OIDC != nil {
			oidcSpec = ep.Spec.OIDC
			break
		}
	}

	if oidcSpec == nil {
		http.NotFound(w, r)
		return
	}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the discovery server logs for the underlying store error detail.
  2. Verify the store backend (etcd/db) is reachable and healthy from the server.
  3. Confirm the universe exists and credentials/permissions for the store are valid.
  4. Retry the discovery request once the backend recovers.
Defensive patterns

Strategy: retry

Try / catch

resp, err := client.Get(url)
if err != nil || resp.StatusCode == http.StatusInternalServerError {
    // retry with backoff; check server/store health
    time.Sleep(backoff)
    return retry()
}

Prevention

When it happens

Trigger: GET /{universe}/.well-known/openid-configuration where the Store implementation (e.g. etcd/db/file backend) returns an error: backend unreachable, universe not found at store level, permission denied, or corrupt data.

Common situations: Discovery store database down or misconfigured; network partition between discovery server and store; wrong universe name; RBAC/credentials for the store expired.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/f5328da6fb324713. Report an issue: GitHub.