storageclass & pvc for daemonset

562 views
Skip to first unread message

Jerry Hwang

unread,
Apr 20, 2018, 12:57:26 AM4/20/18
to Kubernetes user discussion and Q&A
Hello,

I deployed storageclass and pvc and then deployed daemonset (4 pods) to use it, however I noticed the pvc was only mounted by a pod, the other 3 pods were not able to use it.

Anyone has experienced it and found a way around to make sc/pvc available to all pods in daemonset?

Thanks,
J

Michelle Au

unread,
Apr 20, 2018, 10:09:31 AM4/20/18
to Kubernetes user discussion and Q&A
Hi Jerry,

With a Daemonset, all instances share the same PVC, so you need to use some multi writer storage like NFS.

If you want each instance to get a different volume, then you can use Statefulset's volumeClaimTemplates.

--
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-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Jerry Hwang

unread,
Apr 20, 2018, 1:24:48 PM4/20/18
to kubernet...@googlegroups.com
Thank you Michelle!

On Fri, Apr 20, 2018 at 7:09 AM, 'Michelle Au' via Kubernetes user discussion and Q&A <kubernet...@googlegroups.com> wrote:
Hi Jerry,

With a Daemonset, all instances share the same PVC, so you need to use some multi writer storage like NFS.

If you want each instance to get a different volume, then you can use Statefulset's volumeClaimTemplates.

On Thu, Apr 19, 2018, 21:57 Jerry Hwang <speci...@gmail.com> wrote:
Hello,

I deployed storageclass and pvc and then deployed daemonset (4 pods) to use it, however I noticed the pvc was only mounted by a pod, the other 3 pods were not able to use it.

Anyone has experienced it and found a way around to make sc/pvc available to all pods in daemonset?

Thanks,
J

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/6fpB-RBOauk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages