Is possible edit file on gcp persistent disk?

4/14/2019

I have node on google kubernetes engine using persistent volume. Is possible edit files on this volume from gcloud, or google cloud shell? For example edit config and recreate node? Or it is only posiible from running pod using kubectl exec?

-- Jelen
google-cloud-platform
google-kubernetes-engine
kubernetes

2 Answers

4/14/2019

The volume would be a block device, so I’d expect it’d not be possible to edit it outside of the pod it’s attached to. So yes, expecting into the pod would do it, but you could also just use kubectl cp to copy files (and directories!) directly from your local machine onto the volume, mounted to the pod.

Here’s the relevant doc:

https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#cp

-- Funky Penguin
Source: StackOverflow

4/15/2019

i think you can have a look to gsutil command it allows you to interact with your buckets . Guide to Gsutil

-- Semah Mhamdi
Source: StackOverflow