### What would you like to be added?

I have encountered an issue where duplicate tolerations exist within the tolerations array of Kubernetes Deployment YAML. Despite being duplicates, these tolerations are not being ignored as I would have expected, which in my case led to duplicate metric samples produced by the kube-state-metrics. 

A validation check within the Kubernetes API server to reject manifests with duplicate tolerations, ensuring adherence to Kubernetes best practices and avoiding potential issues related to duplicate toleration definitions would be great.

The whole thing was noticed after the update to prometheus v2.52.0 which includes a new check for duplicates during the scrape phase. I created the following issue for that https://github.com/prometheus/prometheus/issues/14089

I have meanwhile also created an issue for the kube-state-metrics project requesting some changes in order to tackle such situations in the future. https://github.com/kubernetes/kube-state-metrics/issues/2390

Steps to reproduce:

1. ) Deploy the following deployment

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-deployment
  labels:
    app: something
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
      - name: test-container
        image: nginx
      tolerations:
       - key: CriticalAddonsOnly
         operator: Exists
       - key: CriticalAddonsOnly
         operator: Exists
```

2.) Check the tolerations of the scheduled pod for instance:
```
...
       tolerations:
       - key: CriticalAddonsOnly
         operator: Exists
       - key: CriticalAddonsOnly
         operator: Exists
...
```

### Why is this needed?

Duplicate tolerations are not being ignored and are applied to resources, potentially resulting in unintended behaviors.
Duplicate Tolerations
This is a GitHub Issue
repo:kubernetes
owner:kubernetes
Title : Duplicate Tolerations
Issue date:

--- start body ---
### What would you like to be added?

I have encountered an issue where duplicate tolerations exist within the tolerations array of Kubernetes Deployment YAML. Despite being duplicates, these tolerations are not being ignored as I would have expected, which in my case led to duplicate metric samples produced by the kube-state-metrics. 

A validation check within the Kubernetes API server to reject manifests with duplicate tolerations, ensuring adherence to Kubernetes best practices and avoiding potential issues related to duplicate toleration definitions would be great.

The whole thing was noticed after the update to prometheus v2.52.0 which includes a new check for duplicates during the scrape phase. I created the following issue for that https://github.com/prometheus/prometheus/issues/14089

I have meanwhile also created an issue for the kube-state-metrics project requesting some changes in order to tackle such situations in the future. https://github.com/kubernetes/kube-state-metrics/issues/2390

Steps to reproduce:

1. ) Deploy the following deployment

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-deployment
  labels:
    app: something
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
      - name: test-container
        image: nginx
      tolerations:
       - key: CriticalAddonsOnly
         operator: Exists
       - key: CriticalAddonsOnly
         operator: Exists
```

2.) Check the tolerations of the scheduled pod for instance:
```
...
       tolerations:
       - key: CriticalAddonsOnly
         operator: Exists
       - key: CriticalAddonsOnly
         operator: Exists
...
```

### Why is this needed?

Duplicate tolerations are not being ignored and are applied to resources, potentially resulting in unintended behaviors.
--- end body ---
