tidb-scheduler should have events.k8s.io permission #1356
Closed
Description
Bug Report
What version of Kubernetes are you using?
1.6.0
What version of TiDB Operator are you using?
1.0.5
What did you expect to see?
What did you see instead?
tidb-scheduelr/kube-scheduler has the following error:
E1217 11:04:17.146944 1 event_broadcaster.go:235] Server rejected event '&v1beta1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"tidb-cluster-prod-pd-1.15e123c12cf0373c", GenerateName:"", Namespace:"tidb-cluster-prod", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, EventTime:v1.MicroTime{Time:time.Time{wall:0xbf764b6c48b35899, ext:6478642925306, loc:(*time.Location)(0x2eeb620)}}, Series:(*v1beta1.EventSeries)(nil), ReportingController:"tidb-scheduler", ReportingInstance:"tidb-scheduler-tidb-scheduler-7644b5cb87-rn4fz", Action:"Scheduling", Reason:"FailedScheduling", Regarding:v1.ObjectReference{Kind:"Pod", Namespace:"tidb-cluster-prod", Name:"tidb-cluster-prod-pd-1", UID:"070d83d1-a4a4-4735-8df4-cc7206abebc3", APIVersion:"v1", ResourceVersion:"4500741", FieldPath:""}, Related:(*v1.ObjectReference)(nil), Note:"Failed filter with extender at URL http://127.0.0.1:10262/scheduler/filter, code 500", Type:"Warning", DeprecatedSource:v1.EventSource{Component:"tidb-scheduler", Host:""}, DeprecatedFirstTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeprecatedLastTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeprecatedCount:0}': 'events.events.k8s.io is forbidden: User "system:serviceaccount:tidb-admin:tidb-scheduler" cannot create resource "events" in API group "events.k8s.io" in the namespace "tidb-cluster-prod"' (will not retry!)
This is because kube-scheduler use events v1beta API (if enabled) since v1.16.
xref: kubernetes/kubernetes#78447, kubernetes/kubernetes#83692
Metadata
Assignees
Labels
No labels
Activity