Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount Google storage bucket in Google container #22931

Closed
jadhavnitind opened this issue Mar 14, 2016 · 3 comments
Closed

Mount Google storage bucket in Google container #22931

jadhavnitind opened this issue Mar 14, 2016 · 3 comments

Comments

@jadhavnitind
Copy link

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.

@brendandburns
Copy link
Contributor

you can use privileged:

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

the --device flag is not currently supported.

@jadhavnitind
Copy link
Author

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.

@hut8
Copy link

hut8 commented Jun 24, 2017

@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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants