You have to understand what you are asking for.  You're saying "this
data is important and needs to be preserved beyond any one pod (a
persistent volume)" but you're also saying "the pods have no identity
because they can scale horizontally".  These are mutually incompatible
statements.

You really want a shared storage API, not volumes...
On Thu, Sep 6, 2018 at 1:08 PM Naseem Ullah <nas...@transit.app> wrote:
>
> I see I see.. what about autoscaling statefulsets with an HPA?
>
> > On Sep 6, 2018, at 4:06 PM, 'Tim Hockin' via Kubernetes user discussion and 
> > Q&A <kubernetes-users@googlegroups.com> wrote:
> >
> > Deployments and PersistentVolumes are generally not a good
> > combination.  This is what StatefulSets are for.
> >
> > There's work happening to allow creation of a volume from a snapshot,
> > but it's only Alpha in the next release.
> > On Thu, Sep 6, 2018 at 1:03 PM Naseem Ullah <nas...@transit.app> wrote:
> >>
> >> Hello,
> >>
> >> I have a similar use case to Montassar.
> >>
> >> Although I could use emptyDirs, each newly spun pod takes 2-3 minutes to 
> >> download required data(pod does something similar to git-sync). If volumes 
> >> could be prepopulated when a new pod is spun it will simply sync the diff, 
> >> which will drastically reduce startup readiness time.
> >>
> >> Any suggestions? Now I have a tradeoff between creating a static number of 
> >> replicas and creating same number of PVCs , or using HPA but emptyDir 
> >> volume which increases startup time for the pod.
> >>
> >> Thanks,
> >> Naseem
> >>
> >> On Thursday, January 5, 2017 at 6:07:42 PM UTC-5, Montassar Dridi wrote:
> >>>
> >>> Hello!!
> >>>
> >>> I'm using Kubernetes deployment with persistent volume to run my 
> >>> application, but when I try to add more replicas or autoscale, all the 
> >>> new pods try to connect to the same volume.
> >>> How can I simultaneously auto create new volumes for each new pod., like 
> >>> statefulsets(petsets) are able to do it.
> >>
> >> --
> >> 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.
>
> --
> 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.
  • [kubernetes-users]... Naseem Ullah
    • Re: [kubernet... 'Tim Hockin' via Kubernetes user discussion and Q&A
      • Re: [kube... Naseem Ullah
        • Re: [... 'Tim Hockin' via Kubernetes user discussion and Q&A
          • R... Naseem Ullah
            • ... 'Jing Xu' via Kubernetes user discussion and Q&A
              • ... Naseem Ullah
                • ... 'Tim Hockin' via Kubernetes user discussion and Q&A
                • ... Naseem Ullah
            • ... 'Tim Hockin' via Kubernetes user discussion and Q&A
              • ... Naseem Ullah
              • ... Naseem Ullah
          • R... David Rosenstrauch
            • ... 'Tim Hockin' via Kubernetes user discussion and Q&A

Reply via email to