<p>My Kubernetes cluster is used for running my graph database (<a href="https://docs.dgraph.io/deploy#using-kubernetes-v1-8-4" rel="nofollow noreferrer">Dgraph</a>). However, I have to load the initial dataset (1TB) that comes as different folders and files into Dgraph. </p>

<p>I've processed the data locally and can now upload the files to my 6 different SSD persistent disks -- is there a way I can do so directly to the disks or do I need to use a Compute Engine Instance and go through it by mounting the disks and then unmounting them?</p>

<p>I have one suggestion which may be quicker and more simple than the method you mention in the post.</p>

<p>Presumably you have persistent disk claims mounted to the pods which will make use of this data.</p>

<p>For example, let's say you have a persistent disk claim mounted to /mnt/data on a pod. </p>

<p>It's possible to copy files to pods using the 'kubectl cp' command. I realise that the dataset you want to upload is very large and would fill a pods standard filesystem. However, if you have the persistent disk claim mounted to the pod that will contain the data the pod utilises, presumably this mounted storage is large enough for that data. You could therefore try using 'kubectl cp' to copy the data to the mount point on the pod, so that it lands on the mounted volume. </p>

<p>You can run this command to try this out:</p>

<pre><code>kubectl cp datafile.csv NAMESPACE_NAME/POD_NAME:/mnt/data
</code></pre>

<p>Other than that, you could consider uploading the data to Cloud Storage using <a href="https://cloud.google.com/storage/docs/gsutil/commands/cp" rel="nofollow noreferrer">gsutil</a>, then install fuse on the nodes as mentioned <a href="https://serverfault.com/questions/891862/can-i-mount-google-cloud-storage-bucket-to-a-pod-as-a-persistent-disk-if-yes-ho?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">here</a> which would allow you to mount the Cloud Storage to pods that need access to the data, although I realise this may not suit everyone use case. </p>
