Repository: kubernetes
Issue: Multi-container pod creation from YAML with multiple "containers" statements
Labels: kind/bug,sig/api-machinery,sig/cli,triage/accepted

### What happened?

Trying to create a POD object, from YAML file, with the following structure, does not throw error.
```
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: busybox
  name: busybox
spec:
  containers:
  - args:
    - /bin/sh
    - -c
    - echo Hello World!
    image: busybox
    name: busybox
    resources: {}
  containers:
  - args:
    - /bin/sh
    - -c
    - echo Hello World!
    image: busybox
    name: busybox2
    resources: {}
  containers:
  - args:
    - /bin/sh
    - -c
    - echo Hello World!
    image: busybox
    name: busybox3
    resources: {}
  dnsPolicy: ClusterFirst
  restartPolicy: Never
status: {}
```

The result of the creation of this object is:
```
controlplane $ k create -f po.yaml
pod/busybox created
controlplane $ k get po
NAME      READY   STATUS      RESTARTS   AGE
busybox   0/1     Completed   0          8s
```
The pod will never go to "Ready" status. The event in the pod description are:
```
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  19s   default-scheduler  Successfully assigned default/busybox to node01
  Normal  Pulling    18s   kubelet            Pulling image "busybox"
  Normal  Pulled     18s   kubelet            Successfully pulled image "busybox" in 165ms (165ms including waiting). Image size: 2160406 bytes.
  Normal  Created    18s   kubelet            Created container busybox3
  Normal  Started    18s   kubelet            Started container busybox3
```
 

### What did you expect to happen?

My understanding is that the "spec" section of this YAML in not correct. I expect no object to be created, when to create such from this YAML file. The behavior as of now is confusing and inconsistent. An error should be throw, informing the user that he should fix the YAML file structure.

### How can we reproduce it (as minimally and precisely as possible)?

1. Create a YAML file with the provided example in the "What happened?" section, name it `po.yaml`
2. Create the object using imperative command `kubectl create -f po.yaml`

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
Client Version: v1.30.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0
```
</details>


### Cloud provider

<details>

`https://killercoda.com/killer-shell-ckad/scenario/playground`

</details>


### OS version

<details>

```console
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>