code: func (c *CreateClusterRoleOptions) RunCreateRole() error {
  	clusterRole := &rbacv1.ClusterRole{
  		// this is ok because we know exactly how we want to be serialized
  		TypeMeta: metav1.TypeMeta{APIVersion: rbacv1.SchemeGroupVersion.String(), Kind: "ClusterRole"},
  	}
  	clusterRole.Name = c.Name
  
  	var err error
  	if len(c.AggregationRule) == 0 {
  		rules, err := generateResourcePolicyRules(c.Mapper, c.Verbs, c.Resources, c.ResourceNames, c.NonResourceURLs)
  		if err != nil {
  			return err
  		}
  		clusterRole.Rules = rules
  	} else {
  		clusterRole.AggregationRule = &rbacv1.AggregationRule{
  			ClusterRoleSelectors: []metav1.LabelSelector{
  				{
  					MatchLabels: c.AggregationRule,
  				},
  			},
  		}
  	}
  
  	// Create ClusterRole.
  	if !c.DryRun {
  		clusterRole, err = c.Client.ClusterRoles().Create(clusterRole)
  		if err != nil {
  			return err
  		}
  	}
  
  	return c.PrintObj(clusterRole)
  }
docs: // RunCreateRole creates a new clusterRole