Difference between revisions of "Kind: ClusterRole"

From wikieduonline
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
  [[kind:]] ClusterRole
 
  [[kind:]] ClusterRole
  apiVersion: [[rbac.authorization.k8s.io/v1]]
+
  [[apiVersion:]] [[rbac.authorization.k8s.io/v1]]
 
  metadata:
 
  metadata:
 
   namespace: '*'
 
   namespace: '*'
Line 13: Line 13:
 
  Ref: https://stackoverflow.com/a/53524535
 
  Ref: https://stackoverflow.com/a/53524535
  
 +
{{cluster-read-only-role}}
  
<pre>
+
 
apiVersion: rbac.authorization.k8s.io/v1
+
apiVersion: [[rbac.authorization.k8s.io]]/v1
kind: ClusterRole
+
kind: ClusterRole
metadata:
+
metadata:
  annotations:
+
  annotations:
    rbac.authorization.kubernetes.io/autoupdate: "true"
+
    [[rbac.authorization.kubernetes.io]]/autoupdate: "true"
  name: view-aws
+
  name: view-aws
rules:
+
rules:
- apiGroups:
+
- apiGroups:
  - '*'
+
  - '*'
  resources:
+
  resources:
  - nodes
+
  - nodes
  - namespaces
+
  - namespaces
  - pods
+
  - pods
  - events
+
  - events
  verbs:
+
  verbs:
  - get
+
  - get
  - list
+
  - list
- apiGroups:
+
- apiGroups:
  - apps
+
  - apps
  resources:
+
  resources:
  - deployments
+
  - deployments
  - daemonsets
+
  - daemonsets
  - statefulsets
+
  - statefulsets
  - replicasets
+
  - replicasets
  verbs:
+
  verbs:
  - get
+
  - get
  - list
+
  - list
- apiGroups:
+
- apiGroups:
 
   - batch
 
   - batch
  resources:
+
  resources:
  - jobs
+
  - jobs
  verbs:
+
  verbs:
  - get
+
  - get
  - list
+
  - list
</pre>
 
 
* https://medium.com/codex/how-to-provide-access-to-aws-eks-for-sso-users-via-aws-sso-to-view-and-manage-the-cluster-17e2acfd6a35
 
* https://medium.com/codex/how-to-provide-access-to-aws-eks-for-sso-users-via-aws-sso-to-view-and-manage-the-cluster-17e2acfd6a35
  
Line 66: Line 66:
 
* <code>[[kind: ClusterConfig]]</code>
 
* <code>[[kind: ClusterConfig]]</code>
 
* <code>[[aws-auth configMap]]</code>
 
* <code>[[aws-auth configMap]]</code>
 +
* [[Terraform resource]]: [[kubernetes_cluster_role]]
  
 
== See also ==
 
== See also ==

Latest revision as of 10:05, 2 November 2023

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  namespace: '*'
  name: pod-reader
rules:
- apiGroups: ["extensions", "apps", ""]
  resources: ["pods"]
  verbs: ["get", "list", "watch"]

Ref: https://stackoverflow.com/a/53524535
 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: cluster-read-only-role [1]
rules:
- apiGroups: ["*"]
  resources: ["*"]
  verbs: ["get","watch","list"]
- nonResourceURLs:
  - /metrics
  verbs:
  - get


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
    rbac.authorization.kubernetes.io/autoupdate: "true"
  name: view-aws
rules:
- apiGroups:
  - '*'
  resources:
  - nodes
  - namespaces
  - pods
  - events
  verbs:
  - get
  - list
- apiGroups:
  - apps
  resources:
  - deployments
  - daemonsets
  - statefulsets
  - replicasets
  verbs:
  - get
  - list
- apiGroups:
 - batch
  resources:
  - jobs
  verbs:
  - get
  - list


K8s Cluster roles[edit]

Related[edit]

See also[edit]

  • https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1182188
  • Advertising: