kubernetes: [-]poststarthook/rbac/bootstrap-roles failed: reason withheld

What happened: the kube-apiserver logs

I1230 11:42:36.625486   51567 healthz.go:177] healthz check poststarthook/crd-informer-synced failed: not finished
I1230 11:42:36.644253   51567 healthz.go:177] healthz check poststarthook/rbac/bootstrap-roles failed: not finished
I1230 11:42:36.644262   51567 healthz.go:177] healthz check poststarthook/scheduling/bootstrap-system-priority-classes failed: not finished
I1230 11:42:36.644280   51567 healthz.go:177] healthz check poststarthook/ca-registration failed: not finished
I1230 11:42:36.644296   51567 healthz.go:191] [+]ping ok
[+]log ok
[+]etcd ok
[+]poststarthook/generic-apiserver-start-informers ok
[+]poststarthook/start-apiextensions-informers ok
[+]poststarthook/start-apiextensions-controllers ok
[-]poststarthook/crd-informer-synced failed: reason withheld
[+]poststarthook/bootstrap-controller ok
[-]poststarthook/rbac/bootstrap-roles failed: reason withheld
[-]poststarthook/scheduling/bootstrap-system-priority-classes failed: reason withheld
[-]poststarthook/ca-registration failed: reason withheld
[+]poststarthook/start-kube-apiserver-admission-initializer ok
[+]poststarthook/start-kube-aggregator-informers ok
[+]poststarthook/apiservice-registration-controller ok
[+]poststarthook/apiservice-status-available-controller ok
[+]poststarthook/kube-apiserver-autoregistration ok
[+]autoregister-completion ok
[+]poststarthook/apiservice-openapi-controller ok
healthz check failed
I1230 11:42:36.633295  134293 healthz.go:193] [+]ping ok
[+]log ok
[+]etcd ok
[+]poststarthook/generic-apiserver-start-informers ok
[+]poststarthook/start-apiextensions-informers ok
[+]poststarthook/start-apiextensions-controllers ok
[+]poststarthook/crd-informer-synced ok
[+]poststarthook/bootstrap-controller ok
[-]poststarthook/rbac/bootstrap-roles failed: reason withheld
[+]poststarthook/scheduling/bootstrap-system-priority-classes ok
[+]poststarthook/ca-registration ok
[+]poststarthook/start-kube-apiserver-admission-initializer ok
[+]poststarthook/start-kube-aggregator-informers ok
[+]poststarthook/apiservice-registration-controller ok
[+]poststarthook/apiservice-status-available-controller ok
[+]poststarthook/kube-apiserver-autoregistration ok
[+]autoregister-completion ok
[+]poststarthook/apiservice-openapi-controller ok
healthz check failed

but this is ok

$ kubectl get --raw /healthz/poststarthook/rbac/bootstrap-roles
ok

the code https://github.com/kubernetes/kubernetes/blob/v1.16.4/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go#L162-L206

What you expected to happen: healthz check passed How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.16.4
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 28 (8 by maintainers)

Most upvoted comments

I guess the health check is ok. For the issue was that the kube-apiserver was on version v1.16.4, but the kube-controller-manager was on v1.17.2. The kube-controller-manager was not able to acquire leader election because the kube-apiserver v1.16.x does no apply the required rbac for it. The fix was also to update kueb-apiserver to v1.17.

Without more information, this isn’t actionable. It is possible for the startup hook to fail if it takes too long to create the bootstrap roles.

If this is encountered, please provide the output of kubectl get --raw /healthz/poststarthook/rbac/bootstrap-roles as well to get published details about the cause of the failure, and the content of the API server log to get internal details about the failure (the hook logs operations prefixed with storage_rbac.go

/close