{"action":"opened","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10664","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10664/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10664/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10664/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/10664","id":92556445,"number":10664,"title":"Data does not persist past life cycle of container with mounted volumes","user":{"login":"marcospedreiro","id":7232583,"avatar_url":"https://avatars.githubusercontent.com/u/7232583?v=3","gravatar_id":"","url":"https://api.github.com/users/marcospedreiro","html_url":"https://github.com/marcospedreiro","followers_url":"https://api.github.com/users/marcospedreiro/followers","following_url":"https://api.github.com/users/marcospedreiro/following{/other_user}","gists_url":"https://api.github.com/users/marcospedreiro/gists{/gist_id}","starred_url":"https://api.github.com/users/marcospedreiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcospedreiro/subscriptions","organizations_url":"https://api.github.com/users/marcospedreiro/orgs","repos_url":"https://api.github.com/users/marcospedreiro/repos","events_url":"https://api.github.com/users/marcospedreiro/events{/privacy}","received_events_url":"https://api.github.com/users/marcospedreiro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-02T05:58:56Z","updated_at":"2015-07-02T05:58:56Z","closed_at":null,"body":"I have a kubernetes cluster running on GCE. One of my replication controllers is for a database image, currently I have only one pod running. My goal is be able to have data survive a container crash, or a pod/replication-controller deletion. \r\n\r\nThe issue is that if the pod or containers fails or has to be restarted/upgraded, I lose all the data that was previously on the database. I'm trying to use the Kubernetes volume mount options to allow the data to survive these events. \r\n\r\nI am using a GCE persistent disk to try to achieve this, however when I restart the replication controller or pod, the container crashes and I am unable to use it. \r\n\r\nHere is a sanitized version of the replication controller I'm using:\r\n\r\n```{\r\n   \"kind\":\"ReplicationController\",\r\n   \"apiVersion\":\"v1beta3\",\r\n   \"metadata\":{\r\n      \"name\":\"influx\",\r\n      \"labels\":{\r\n         \"name\":\"influx\"\r\n      }\r\n   },\r\n   \"spec\":{\r\n      \"replicas\":1,\r\n      \"selector\":{\r\n         \"name\":\"influx\"\r\n      },\r\n      \"template\":{\r\n         \"metadata\":{\r\n            \"labels\":{\r\n               \"name\":\"influx\"\r\n            }\r\n         },\r\n         \"spec\":{\r\n            \"containers\":[\r\n               {\r\n                  \"name\":\"tutum-influx\",\r\n                  \"image\":\"tutum/influxdb:0.9\",\r\n                  \"volumeMounts\":[\r\n                     {\r\n                        \"mountPath\":\"/data\",\r\n                        \"name\":\"my-disk\"\r\n                     }\r\n                  ],\r\n                  \"ports\":[\r\n                     {\r\n                        \"containerPort\":8083,\r\n                        \"protocol\":\"TCP\"\r\n                     },\r\n                     {\r\n                        \"containerPort\":8086,\r\n                        \"protocol\":\"TCP\"\r\n                     }\r\n                  ]\r\n               }\r\n            ],\r\n            \"volumes\":[\r\n               {\r\n                  \"name\":\"my-disk\",\r\n                  \"gcePersistentDisk\": {\r\n                     \"pdName\":\"my-disk\",\r\n                     \"fsType\":\"ext4\",\r\n                     \"readOnly\":false\r\n                  }\r\n               }\r\n            ]         \r\n         }\r\n      }\r\n   }\r\n}\r\n```\r\n"}}