How do I connect Kubernetes Engine on GCP to an external Google Cloud Storage Bucket?

10/30/2018

I have deployed a pod on a Kubernetes Cluster on GCP. I have used a Persistent volume using a PVC as the volume mount. I need to input data(.doc files) residing in Google Cloud Storage buckets into the the pod's data path.

How do I mount this external storage or injest the data into the pod?

And I require this this to be a live connection or for the injestion to happen at regular intervals.

-- Ben Abey
elasticsearch
google-kubernetes-engine
kubernetes

2 Answers

11/6/2018

I found a way to mount google cloud storage buckets into Kubernetes- GCS Fuse has to be built into the image and then the cloud storage buckets can be mounted as directories. I referred to these links to implement this-

https://karlstoney.com/2017/03/01/fuse-mount-in-kubernetes/

https://github.com/maciekrb/gcs-fuse-sample

-- Ben Abey
Source: StackOverflow

11/2/2018

As mentioned by Ahmet and Patrick, it is not possible to mount Google Cloud Storage (GCS) buckets as PV/PVCs at Google Kubernetes Engine (GKE).

-- Rahi
Source: StackOverflow