Usage of extra meta data under spec to create a job

Need to know what difference actually the meta data under spec is making. as after executing this i did not see my name anywhere so what is the use of it. as in kubernetes task L1- 9 they have mentioned to use metadata under template again. so need to understand
pasting the yaml below

apiVersion: batch/v1
kind: Job
metadata:
name: test
spec:
template:
metadata:
name: myname
spec:
containers:
- name: container-countdown-nautilus
image: debian:latest
command: [“sleep”, “5”]
restartPolicy: Never

Hi @Girish2

A Kubernetes Job is a resource that spins up some Pods until a specified number of them successfully terminate.

Now, Job.metadata contains all the metadata fields defined for the Job resource like name, namespace, labels, etc.

The metadata under spec.template.metadata are the metadata fields defined for the Pods that the Job will create (not required, but helpful for finding them).