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

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

<p>We can use gcsfuse or s3fuse to mount Google Storage bucket in Kubernetes pod/Container. Before starting installation of fuse on container run container with SYS_ADMIN privileges like below.</p>

<p>$ docker run -it --cap-add SYS_ADMIN --name dev --device /dev/fuse ContainerID/Name /bin/bash</p>

<ol>
<li>Install <a href="https://github.com/GoogleCloudPlatform/gcsfuse" rel="noreferrer">gcsfuse</a> or <a href="https://github.com/s3fs-fuse/s3fs-fuse/wiki/Google-Cloud-Storage" rel="noreferrer">s3fuse</a> in pod/Container image.</li>
<li>Create shell script and add mount command in it.</li>
<li><p>Add privileged parameter into the YAML file to grant admin capabilities to pod/Container.
example as below.</p>

<pre><code>  securityContext:
     capabilities: {}
     privileged: true
</code></pre></li>
<li><p>Add Postlife cycle hook parameters in YAML file to mount bucket after postStart of pod/Container.
example as below.</p>

<pre><code>  lifecycle:
    postStart:
     exec:
        command:
          - "sh"
          - "/usr/local/gcsfusemount.sh"
</code></pre></li>
</ol>
