I wanted to edit your post to use code block so we can actually see the indentations, then I noticed that even your inserted yaml is syntactically wrong. Whe you insert code, please, make sure it is readable and syntactically correct unless your question is about syntax.
I think you should use StatefulSet instead of Deployment
In StatefulSet you can define a volumeClaimTemplate
Note: Probably many of us know Kubernetes, but keep in mind that this is a Docker forum and Kubernetes does not necessarily use Docker at all. Although I can see that you asked about this on the Kubernetes forum as well: