# What a responder needs during an incident, and nothing more: read what is # running, relabel a pod, and cordon a node. No exec, no secrets, no deletes. # Exec would change the evidence, secrets are not needed to preserve it, and a # delete is the one move that destroys it. --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: incident-responder rules: - apiGroups: [""] resources: [pods, pods/log, events, namespaces, nodes, services, serviceaccounts, configmaps, endpoints] verbs: [get, list, watch] - apiGroups: [""] resources: [pods, nodes] verbs: [patch] - apiGroups: [apps] resources: [deployments, replicasets, daemonsets, statefulsets] verbs: [get, list, watch] - apiGroups: [networking.k8s.io] resources: [networkpolicies] verbs: [get, list, watch] - apiGroups: [rbac.authorization.k8s.io] resources: [roles, rolebindings, clusterroles, clusterrolebindings] verbs: [get, list, watch] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: incident-responder roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: incident-responder subjects: # Map this group from your identity provider, through EKS access entries or # GKE's Google Groups for RBAC. On GKE the name must be the Google group's # email address, such as incident-responders@example.com, and the group a # member of gke-security-groups@ in your domain. - apiGroup: rbac.authorization.k8s.io kind: Group name: incident-responders