---
title: "Profile"
description: "Reference for the Profile resource in Calico Open Source that groups labels and rules applied to endpoints."
product: "Calico Open Source"
version: "3.33 (latest)"
section: "Reference"
canonical_url: "https://docs.tigera.io/calico/latest/reference/resources/profile"
---

# Profile

A profile resource (Profile) represents a group of endpoints that inherit a shared set of labels. For historic reasons, profiles can also include policy rules, but that feature is deprecated in favor of the much more flexible [NetworkPolicy](https://docs.tigera.io/calico/latest/reference/resources/networkpolicy.md) and [GlobalNetworkPolicy](https://docs.tigera.io/calico/latest/reference/resources/globalnetworkpolicy.md) resources. Profile is a cluster-scoped resource.

Each Calico endpoint or host endpoint can be assigned to zero or more profiles.

With the Kubernetes datastore, profiles are read-only. Calico generates a profile for each namespace and service account, and you cannot create, update, or delete profiles.

For `kubectl` commands, you can use the aliases `profile.projectcalico.org`, `profiles.projectcalico.org`, `profile.p`, and `profiles.p`.

## Sample YAML

The following sample profile applies the label `stage: development` to any endpoint that includes `dev-apps` in its list of profiles.

```yaml
apiVersion: projectcalico.org/v3
kind: Profile
metadata:
  name: dev-apps
spec:
  labelsToApply:
    stage: development
```

## Definition

### Metadata

| Field    | Description                         | Accepted Values                                                                                                          | Schema                  | Default |
| -------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------- | ------- |
| `name`   | The name of this profile. Required. | Lowercase alphanumeric characters, `-`, or `.`. Must start and end with an alphanumeric character. Up to 253 characters. | string                  |         |
| `labels` | A set of labels for this profile.   |                                                                                                                          | map of string to string |         |

### Spec

| Field                    | Description                                                                                                    | Accepted Values | Schema                                                                                      | Default |
| ------------------------ | -------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------- | ------- |
| `ingress` *(deprecated)* | The ingress rules belonging to this profile.                                                                   |                 | list of [Rule](https://docs.tigera.io/calico/latest/reference/resources/networkpolicy.md#rule) |         |
| `egress` *(deprecated)*  | The egress rules belonging to this profile.                                                                    |                 | list of [Rule](https://docs.tigera.io/calico/latest/reference/resources/networkpolicy.md#rule) |         |
| `labelsToApply`          | An optional set of labels to apply to each endpoint in this profile (in addition to the endpoint's own labels) |                 | map of string to string                                                                     |         |

For `Rule` details please see the [NetworkPolicy](https://docs.tigera.io/calico/latest/reference/resources/networkpolicy.md) or [GlobalNetworkPolicy](https://docs.tigera.io/calico/latest/reference/resources/globalnetworkpolicy.md) resource.

## Additional resources

- [Network policy](https://docs.tigera.io/calico/latest/reference/resources/networkpolicy.md)
- [Global network policy](https://docs.tigera.io/calico/latest/reference/resources/globalnetworkpolicy.md)
- [Workload endpoint](https://docs.tigera.io/calico/latest/reference/resources/workloadendpoint.md)
- [Host endpoint](https://docs.tigera.io/calico/latest/reference/resources/hostendpoint.md)
