0

ConfigMap 存在于正确的命名空间中,但收到无法构造对 configmap 的引用的错误,并且没有得到已成功要求领导者选举的确认。任何意见,将不胜感激

错误日志片段

...
2021-08-04T18:14:35.659Z        INFO    setup   starting manager
2021-08-04T18:14:35.659Z        INFO    controller-runtime.manager      starting metrics server {"path": "/metrics"}
E0804 18:14:35.701075       1 event.go:247] Could not construct reference to: '&v1.ConfigMap{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"controller-leader-election-helper", GenerateName:"", Namespace:"kubestone-system", SelfLink:"", UID:"e28283ca-45ad-4095-9077-d55c8c0a40be", ResourceVersion:"10947", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63763697675, loc:(*time.Location)(0x21639e0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string{"control-plane.alpha.kubernetes.io/leader":"{\"holderIdentity\":\"kubestone-controller-manager-f467b7c47-8n8nz_d30009f2-f54f-11eb-9895-d6c135c24951\",\"leaseDurationSeconds\":15,\"acquireTime\":\"2021-08-04T18:14:35Z\",\"renewTime\":\"2021-08-04T18:14:35Z\",\"leaderTransitions\":0}"}, OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry{v1.ManagedFieldsEntry{Manager:"manager", Operation:"Update", APIVersion:"v1", Time:(*v1.Time)(0xc0002739e0), Fields:(*v1.Fields)(nil)}}}, Data:map[string]string(nil), BinaryData:map[string][]uint8(nil)}' due to: 'selfLink was empty, can't make reference'. Will not report event: 'Normal' 'LeaderElection' 'kubestone-controller-manager-f467b7c47-8n8nz_d30009f2-f54f-11eb-9895-d6c135c24951 became leader'
2021-08-04T18:14:37.760Z        INFO    controller-runtime.controller   Starting Controller     {"controller": "sysbench"}
...
4

1 回答 1

1

看起来错误告诉你:

...
SelfLink: "",
...

... due to: 'selfLink was empty, can't make reference' ...

这里的线程建议了一些解决方案https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/issues/25#issuecomment-742616668

您可能需要更新您的 Kubernetes 客户端,但如果没有更多信息很难说

于 2021-08-05T00:10:04.760 回答