Kubernetes Deep Dive Room

Sign Up Free or Log In to participate!

K8s, deployment : diffrences between .spec.selector.matchLabels and .spec.template.metadata.labels

In kubernetes Deployment spec, I still don’t get the diffrences between .spec.selector.matchLabels and .spec.template.metadata.labels. Any precision please ?

1 Answers

Ok, got the answer in the next lesson "Theory of Deployments, 7:30".

The .spec.template.metadata.labels labels the pods

the  .spec.selector.matchLabels, like the service’s, link pods to the depoyment.

Thanks !

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?