This repository has been archived by the owner on Feb 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
Error message "kube-state-metrics" is forbidden #1095
Comments
Hi, Could you check if the roles and rolebindings in the kubeprod namespace for kube-state-metrics are created? |
Hi, yes I've the following role binding created (from apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
kubecfg.ksonnet.io/garbage-collect-tag: kube_prod_runtime
name: kube-state-metrics
name: kube-state-metrics
namespace: kubeprod
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kube-state-metrics-resizer
subjects:
- kind: ServiceAccount
name: kube-state-metrics
namespace: kubeprod floek |
And here is the Role: apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kube-state-metrics-resizer
namespace: kubeprod
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- extensions
resourceNames:
- kube-state-metrics
resources:
- deployments
verbs:
- get
- update Seems there is no entry for deployments and apiGroup "apps". floek |
Hi, This is strange, as the
As you can see, there's an |
Hi, you showed me the code for the "ClusterRole". In the same file a view lines down there ist the code for the "Role":
Here roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kube-state-metrics-resizer and corresponds to my role shown in the comment #1095 (comment) Floek |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I've found an error in the logs of the kube-state-metrics pod:
Can anyone help, what's the problem here?
Thanks
floek
The text was updated successfully, but these errors were encountered: