{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16022","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16022/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16022/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16022/events","html_url":"https://github.com/kubernetes/kubernetes/issues/16022","id":112565458,"number":16022,"title":"High availability issue with rethinkdb cluster in kubernetes","user":{"login":"ntquyen","id":1430058,"avatar_url":"https://avatars.githubusercontent.com/u/1430058?v=3","gravatar_id":"","url":"https://api.github.com/users/ntquyen","html_url":"https://github.com/ntquyen","followers_url":"https://api.github.com/users/ntquyen/followers","following_url":"https://api.github.com/users/ntquyen/following{/other_user}","gists_url":"https://api.github.com/users/ntquyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ntquyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntquyen/subscriptions","organizations_url":"https://api.github.com/users/ntquyen/orgs","repos_url":"https://api.github.com/users/ntquyen/repos","events_url":"https://api.github.com/users/ntquyen/events{/privacy}","received_events_url":"https://api.github.com/users/ntquyen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/cluster","name":"team/cluster","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-21T11:23:09Z","updated_at":"2015-10-27T14:54:45Z","closed_at":null,"body":"I'm setting up rethinkdb cluster inside kubernetes, but it doesn't work as expected for high availability  requirement. Because when a pod is down, kubernetes will creates another pod, which runs another container of the same image, old mounted data will be erased and the new pod will join the cluster as a brand new instance. I'm running k8s in CoreOS v773.1.0 stable.\r\n\r\nPlease correct me if i'm wrong, but that way it seems impossible to setup a database cluster inside k8s.\r\n\r\nUpdate: As documented here http://kubernetes.io/v1.0/docs/user-guide/pod-states.html#restartpolicy, if `RestartPolicy: Always` it will restart the container if exits failure. It means by \"restart\" that it brings up the same container, or create another one? Or maybe because I stop the pod via command `kubectl stop po` so it doesn't restart the same container?\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/151529162","html_url":"https://github.com/kubernetes/kubernetes/issues/16022#issuecomment-151529162","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16022","id":151529162,"user":{"login":"ntquyen","id":1430058,"avatar_url":"https://avatars.githubusercontent.com/u/1430058?v=3","gravatar_id":"","url":"https://api.github.com/users/ntquyen","html_url":"https://github.com/ntquyen","followers_url":"https://api.github.com/users/ntquyen/followers","following_url":"https://api.github.com/users/ntquyen/following{/other_user}","gists_url":"https://api.github.com/users/ntquyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ntquyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntquyen/subscriptions","organizations_url":"https://api.github.com/users/ntquyen/orgs","repos_url":"https://api.github.com/users/ntquyen/repos","events_url":"https://api.github.com/users/ntquyen/events{/privacy}","received_events_url":"https://api.github.com/users/ntquyen/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T14:54:45Z","updated_at":"2015-10-27T14:54:45Z","body":"The problem of using HostPath is that \"There is no guarantee your pod ends up on the correct node where the HostPath resides.\" according to this docs https://github.com/kubernetes/kubernetes/tree/master/docs/user-guide/persistent-volumes\r\nHowever, I think I can use `label` on specific node to make sure of that, isn't that right?\r\n"}}