Oh, I didn't notice that was a pod and ignored everything before "spec". Sorry my bad.
Have you seen the readme there? https://github.com/kubernetes/examples/blob/master/staging/storage/redis/README.md It explains why it creates a pod, it seems basically for didactic reasons and just bootstrap the cluster. And the steps, of course, are quite specific to redis. And those replication controller, redis-controller.yaml and redis-sentinel-controller.yaml, if I'm not missing something, will not fight if you ignore the first manually created pod (that is deleted in the turorial) as they have: selector: name: redis template: metadata: labels: name: redis And selector: redis-sentinel: "true" template: metadata: labels: name: redis-sentinel redis-sentinel: "true" role: sentinel (Sorry for the c&p, I'm on my phone) So, I don't see why those collide (ignoring the first pod, as the readme says to delete it) On Monday, August 7, 2017, <rgoncal...@gmail.com> wrote: > Hi Rodrigo. > > If you look at the redis-master.yaml, there's a pod with the following > labels: > > metadata: > labels: > name: redis > redis-sentinel: "true" > role: master > > > redis-controller.yaml describes a replication controller with selector: > metadata: > name: redis > spec: > replicas: 1 > selector: > name: redis > > redis-sentinel-controller.yaml describes a replication controller with > selector: > metadata: > name: redis-sentinel > spec: > replicas: 1 > selector: > redis-sentinel: "true" > > > Both replication controller selectors will match the first POD labels. > Unless I'm misunderstanding something, here we have two replication > controllers fighting for the same pod. This "arrangement" is convenient for > setting up a redis cluster, because initially we have to set one redis > instance as master explicitly. After that the cluster will take care of > electing a new master if necessary. > > Thanks, > Rui > > > -- > 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 <javascript:;>. > To post to this group, send email to kubernetes-users@googlegroups.com > <javascript:;>. > 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.