kubernetes/kops · error
building corev1 client: %w
Error message
building corev1 client: %w
What it means
NewGCEIPAMReconciler builds a typed corev1 client from the controller-runtime manager's REST config; this wraps that construction failing. The manager config itself was already established, so this is essentially an internal client-go setup error (e.g. invalid auth fields).
Source
Thrown at cmd/kops-controller/controllers/gceipam.go:46
apierrors "k8s.io/apimachinery/pkg/api/errors"
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/klog/v2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/manager"
)
// NewGCEIPAMReconciler is the constructor for a GCEIPAMReconciler
func NewGCEIPAMReconciler(mgr manager.Manager) (*GCEIPAMReconciler, error) {
klog.Info("starting gce ipam controller")
r := &GCEIPAMReconciler{
client: mgr.GetClient(),
log: ctrl.Log.WithName("controllers").WithName("gce-ipam"),
}
coreClient, err := corev1client.NewForConfig(mgr.GetConfig())
if err != nil {
return nil, fmt.Errorf("building corev1 client: %w", err)
}
r.coreV1Client = coreClient
gceClient, err := compute.NewService(context.Background())
if err != nil {
return nil, fmt.Errorf("building compute API client: %w", err)
}
r.gceClient = gceClient
return r, nil
}
// GCEIPAMReconciler observes Node objects, assigning their `PodCIDRs` from the instance's `ExternalIpv6`.
type GCEIPAMReconciler struct {
// client is the controller-runtime client
client client.Client
// log is a logrView on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the wrapped client-go error for the invalid config field
- Verify the controller manager's REST config/credentials are valid
- Restart kops-controller after fixing credential or kubeconfig issues
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at cmd/kops-controller/controllers/gceipam.go:46 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/59c0b5d3227d3465.
Report an issue: GitHub.