Even declaring name of the pod under metadata as nginx-pod the kubernetes is taking name of the pod as same as deployment name why so?
The pods of a deployment are scheduled by the deployment controller, i.e. it is responsible for creating the pods defined by the template
metadata.name
in the pod’s template is ignored by the deployment controller, which creates its own name for the pods which is the deployment name (nginx-deployment
), followed by the replicaset ID (7b48bf4747
- every deployment is associated with a replicaset) followed by a random unique ID (779x7
etc.)