# ClusterRoleBinding Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [ClusterRoleBinding](/reference/api/csharp/aspire.hosting.kubernetes/clusterrolebinding.md)
- Kind: `Properties`
- Members: `2`

Represents a ClusterRoleBinding in a Kubernetes cluster.

## RoleRef

- Name: `RoleRef`
- Modifiers: `get; set`
- Returns: [RoleRefV1](/reference/api/csharp/aspire.hosting.kubernetes/rolerefv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/ClusterRoleBindingV1.cs)

Gets or sets the RoleRef property, which contains information pointing to the Kubernetes role being referenced within the ClusterRoleBinding configuration. The RoleRef property defines the role name, kind, and the group for API access, to ensure the binding is correctly associated with the intended permissions and scope.

```csharp
public RoleRefV1 RoleRef { get; set; }
```

## Subjects

- Name: `Subjects`
- Modifiers: `get`
- Returns: [List<SubjectV1>](/reference/api/csharp/aspire.hosting.kubernetes/subjectv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/ClusterRoleBindingV1.cs#L39)

Gets the list of subjects associated with the ClusterRoleBinding. Subjects refer to the entities (users, groups, or service accounts) that the role binding applies to.

```csharp
public List<SubjectV1> Subjects { get; }
```

## Remarks

Each subject in the list can represent a specific user, group, or Kubernetes resource that is granted the permissions defined in the associated role. This property is initialized as an empty list and can contain zero or more subjects.
