RBAC Roles

Kubernetes 1.6+ comes with a set of pre-defined set of user-facing roles. You can create ClusterRoleBindings or RoleBindings to grant permissions to your Github teams or Google groups. Say, you have a Github team called ops. You want to make the members of this Github team admin of a cluster. You can do that using the following command:

echo "
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
  name: ops-team
- kind: Group
  name: ops
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io
" | kubectl apply -f -