Kubernetes: Mount Google storage bucket in Google container

Created on 14 Mar 2016  ·  3Comments  ·  Source: kubernetes/kubernetes

I would like to mount Google storage bucket in Google Container Engine using gcafuse or any other tool/other provision. The Docker container runs under Google container engine So,we need to use yaml file to define few parameters in it.

If there is any kind of thing/parameter that can be used in .yaml file to build new replication controller/service using privileged or --device sys_admin or any other required parameters in it.

Most helpful comment

@jadhavnitind You've probably solved this by now, but for those of us like myself who find this as the first hit in Google, check out: https://lemag.sfeir.com/wordpress-cluster-docker-google-cloud-platform/

All 3 comments

you can use privileged:

http://kubernetes.io/docs/user-guide/pods/#privileged-mode-for-pod-containers

the --device flag is not currently supported.

Is it possible to mount Google storage bucket in Google Container Engines pod/container? I have installed gcsfuse in the docker container image and using following parameters to mount it still not able to mount it in container. Need more inputs on it.

apiVersion: v1
kind: Service
metadata:
name: apache-frontend
labels:
app: apache-webapp
spec:
type: NodePort
ports:

  • port: 80
    targetPort: 80
    protocol: TCP
    name: http
  • port: 443
    protocol: TCP
    name: https
    selector:
    app: apache-webapp
    type: LoadBalancer

apiVersion: v1
kind: ReplicationController
metadata:
name: apache-frontend
spec:
replicas: 1
template:
metadata:
labels:
app: apache-webapp
spec:
containers:
- name: apache-https
image: gcr.io/myproject/new-httpd:v1
securityContext:
capabilities: {}
privileged: true
command: ["gcsfuse --key-file=/usr/local/Test.json test1-clod-storage /mnt"]
ports:
- containerPort: 443
- containerPort: 80

Thanks in Advance.

@jadhavnitind You've probably solved this by now, but for those of us like myself who find this as the first hit in Google, check out: https://lemag.sfeir.com/wordpress-cluster-docker-google-cloud-platform/

Was this page helpful?
0 / 5 - 0 ratings