I play with kubernet and google container engine (GKE).
I deployed the container from this jupyter / all-spark-notebook image
This is my replication controller:
{ "apiVersion": "v1", "kind": "ReplicationController", "metadata": { "name": "datalab-notebook" }, "spec": { "replicas": 1, "selector": { "app": "datalab-notebook" }, "template": { "metadata": { "name": "datalab-notebook", "labels": { "environment": "TEST", "app": "datalab-notebook" } }, "spec": { "containers": [{ "name": "datalab-notebook-container", "image": "jupyter/all-spark-notebook", "env": [], "ports": [{ "containerPort": 8888, "name": "datalab-port" }], "volumeMounts": [{ "name": "datalab-notebook-persistent-storage", "mountPath": "/home/jovyan/work" }] }], "volumes": [{ "name": "datalab-notebook-persistent-storage", "gcePersistentDisk": { "pdName": "datalab-notebook-disk", "fsType": "ext4" } }] } } } }
As you can see, I installed the Google Compute Engine Persistent Permanent Disk. My problem is that the container uses a non-root user, and the installed disk belongs to root. therefore my container cannot write to disk.
- Is there a way to mount persistent GCE disks and make them read / write for containers without root users?
- Another common question: is it safe to run a container with root user in the Google Container Engine?
Thank you in advance for your inputs.
source share