kittydoor
kittydoor

Reputation: 123

Kubernetes one pod per node, one persistent volume per pod

I was curious if it is possible to move completely off hostpaths and use local volumes (persistent volumes) instead. However, there doesn't seem to be a way to include volumeClaimTemplates into a daemonset.

Statefulsets provide volumeClaimTemplates, but they require the replicas to be manually defined, as opposed to auto scaling to as many nodes as can be found.

Is there a way to automatically scale to all nodes, and also create a pvc per replica?

Related question where they decided to use statefulsets and give up autoscaling: Handling PersistentVolumeClaim in DaemonSet

Upvotes: 2

Views: 1819

Answers (1)

Dawid Kruk
Dawid Kruk

Reputation: 9905

There is no possibility for now to use PersistentVolumes in Daemon Set.

There was a feature request for it on Github but unfortunately it was closed. Link to this request: volumeClaimTemplates available for Daemon Sets

There is a comment in the link above which is describing this topic a bit more.

Upvotes: 3

Related Questions