If I recall correctly, the implicit selector is created from the daemonset metadata.
A daemonset needs a selector to function, so it knows which pods already exist. You are probably better off being explicit about it. /MR On Tue, Apr 11, 2017, 23:07 Nate Rook <n...@askspoke.com> wrote: > So, I'm updating a daemonset to look like this: > > apiVersion: extensions/v1beta1 > kind: DaemonSet > metadata: > name: sysdig-agent > spec: > template: > metadata: > name: sysdig-agent > labels: > type: sysdig-agent > class: infrastructure > environment: staging > spec: > // ... > > But, I was surprised to get this error when I tried kubectl applying the > update: > > The DaemonSet "sysdig-agent" is invalid: spec.template.metadata.labels: > Invalid value: > {"class":"infrastructure","environment":"staging","type":"sysdig-agent"}: > `selector` does not match template `labels` > > I never actually created a selector, so I gather one is created > implicitly. But I'm not sure what my implicit selector looks like, or why > it disagrees with these labels. > > I do see if I add a 'name' label to my pod template as well, everything > works fine. But I'm not clear on why that is. Any ideas? > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.