# Selector

Fargate profile selector.

- Source: [`aws-eks/lib/fargate-profile.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-eks/lib/fargate-profile.ts#L92)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_eks as eks } from 'aws-cdk-lib';
const selector: eks.Selector = {
  namespace: 'namespace',

  // the properties below are optional
  labels: {
    labelsKey: 'labels',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_eks as eks

selector = eks.Selector(
    namespace="namespace",

    # the properties below are optional
    labels={
        "labels_key": "labels"
    }
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.eks.*;

Selector selector = Selector.builder()
        .namespace("namespace")

        // the properties below are optional
        .labels(Map.of(
                "labelsKey", "labels"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EKS;

var selector = new Selector {
    Namespace = "namespace",

    // the properties below are optional
    Labels = new Dictionary<string, string> {
        { "labelsKey", "labels" }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

selector := &Selector{
	Namespace: jsii.String("namespace"),

	// the properties below are optional
	Labels: map[string]*string{
		"labelsKey": jsii.String("labels"),
	},
}
```

## Properties

- `labels`: { [key: string]: string } — The Kubernetes labels that the selector should match.

  **Default:** all pods within the namespace will be selected.

  A pod must contain
  all of the labels that are specified in the selector for it to be
  considered a match.

- `namespace`: string (required) — The Kubernetes namespace that the selector should match.

  You must specify a namespace for a selector. The selector only matches pods
  that are created in this namespace, but you can create multiple selectors
  to target multiple namespaces.
