apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: agent-manager-role rules: - apiGroups: [""] resources: ["namespaces", "pods", "services", "configmaps", "secrets", "persistentvolumeclaims"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["apps"] resources: ["deployments", "replicasets"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["networking.k8s.io"] resources: ["ingresses"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["metrics.k8s.io"] resources: ["pods", "nodes"] verbs: ["get", "list"] --- apiVersion: v1 kind: ServiceAccount metadata: name: agent-manager namespace: agent-manager --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: agent-manager-binding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: agent-manager-role subjects: - kind: ServiceAccount name: agent-manager namespace: agent-manager