{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1319","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1319/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1319/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1319/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/1319","id":42786789,"number":1319,"title":"Run a Docker registry","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/area/usability","name":"area/usability","color":"00cc00"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/kind/design","name":"kind/design","color":"50cba5"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/kind/enhancement","name":"kind/enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/kind/gsoc","name":"kind/gsoc","color":"84b6eb"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P3","name":"priority/P3","color":"fef2c0"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/status/help-wanted","name":"status/help-wanted","color":"159818"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/team/cluster","name":"team/cluster","color":"d2b48c"}],"state":"open","locked":false,"assignee":{"login":"ddysher","id":2191361,"avatar_url":"https://avatars.githubusercontent.com/u/2191361?v=3","gravatar_id":"","url":"https://api.github.com/users/ddysher","html_url":"https://github.com/ddysher","followers_url":"https://api.github.com/users/ddysher/followers","following_url":"https://api.github.com/users/ddysher/following{/other_user}","gists_url":"https://api.github.com/users/ddysher/gists{/gist_id}","starred_url":"https://api.github.com/users/ddysher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddysher/subscriptions","organizations_url":"https://api.github.com/users/ddysher/orgs","repos_url":"https://api.github.com/users/ddysher/repos","events_url":"https://api.github.com/users/ddysher/events{/privacy}","received_events_url":"https://api.github.com/users/ddysher/received_events","type":"User","site_admin":false},"milestone":null,"comments":49,"created_at":"2014-09-15T15:48:13Z","updated_at":"2015-05-10T01:18:29Z","closed_at":null,"body":"@jbeda's idea.\r\n\r\nIt might be useful to have our standard set up scripts have the master run a registry. This would make it easy to upload/distribute \"local\" images across the cluster.\r\n\r\nWhile Docker has a clear idea around local and remote images, with k8s we now have \"cluster local\" images that need to be distributed fast across the cluster but don't need to bounce off of the public registry."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/100568921","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/1319#issuecomment-100568921","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1319","id":100568921,"user":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T01:18:29Z","updated_at":"2015-05-10T01:18:29Z","body":"\r\n\r\n> On May 9, 2015, at 8:25 PM, Deyuan Deng <notifications@github.com> wrote:\r\n> \r\n> On Sat, May 9, 2015 at 5:14 PM Clayton Coleman <notifications@github.com>\r\n> wrote:\r\n> \r\n> >\r\n> >\r\n> > > On May 9, 2015, at 2:03 PM, Deyuan Deng <notifications@github.com>\r\n> > wrote:\r\n> > >\r\n> > > Sorry, I've been distracted quite a bit last month.\r\n> > >\r\n> > > Making it an add-on is ideal and preferrable, but I think we need\r\n> > support from various components to make it work. Suppose we created pods\r\n> > running a stock docker/registry image, and a service kube-registry for this\r\n> > registry addon. To push/pull a user image\r\n> > registry.default.kubernetes.local/user/image:tag, we need:\r\n> > >\r\n> > > A way to push the image from local repo to cluster registry Option1:\r\n> > Make kubectl smart enough to push the image, e.g. kubectl create image\r\n> > registry.default.kubernetes.local/user/image:tag. But how will this work? I\r\n> > think a common pattern today is to have master proxy the request, but\r\n> > proxying the image sounds a lot of work. Option2: Have a different backing\r\n> > storage, like GCS, and we just push image to that storage. This depends on\r\n> > some external services, I'd like to avoid it first. e.g. user can use local\r\n> > disk by default for small workload.\r\n> >\r\n> > We use the service ip in Openshift - the hosts have access to it. We don't\r\n> > wire the nodes to use the cluster DNS yet but it's a small step to that and\r\n> > it will give you the IP you wantz\r\n> >\r\n> \r\n> Being able to access the service IP in all hosts is essential to distribute\r\n> images across k8s; kubelet can just pull from that IP for images. l'm\r\n> trying to figure out the best way to upload an image. There is no cluster\r\n> 'build service', so client needs to push an image to the registry. I'm not\r\n> sure if new service model could help here, in which case we might be able\r\n> to make it external accessible. Our last resort would be to proxy through\r\n> master, which should work on all cluster setup.\r\n\r\nYou can make an outside registry internally available if you want, but I don't know that you *have* to have the registry in the cluster. If you have the registry CA on every node, the docker daemon can query the internal DNS you're set.  It should be easier to get CAs into nodes but that's something that can be solved outside of Kube for now.\r\n\r\n> \r\n> @smarterclayton @thockin Any idea? Is there anything I'm not aware of that\r\n> solves the problem nicely, or maybe it's just easier to offer a 'build\r\n> service' that takes a dockerfile/image spec, build it and store it in\r\n> registry?\r\n\r\nWell... Openshift has one of those that's designed to be integrated into a Kube deployment... So yes :). However, someone pushing images into the Kube cluster makes a lot of sense, but something has to be able to translate \"new image available\" into \"do something with that image\" (that's really the Deployments concept we are trying to move from Openshift into Kube).\r\n\r\n> \r\n> \r\n> > For disk, that's the default we use in the Openshift registry setup - runs\r\n> > the image on local disk first, then you switch to object store or gluster\r\n> > or NFS or gce disk when ready.\r\n> >\r\n> \r\n> I'm interested to know how can we switch storage on-the-fly. At minimal,\r\n> we'll need to change the configuration and restart the registry?\r\n\r\nAnd copy the data, which could be something your registry does (if two volumes exist, the first volume is empty but the second has data, copy the second set of data into the first).  However, the registry will work best if scaled horizontally, so object store is a great complement to the registry (having an easy to use object store example on the system would be nice).\r\n\r\n> \r\n> \r\n> > > A way to pull the image: We need to give the registry service a fixed\r\n> > IP, similar to dns. When pulling image, kubelet itself translates\r\n> > registry.default.kubernetes.local to the fixedIP\r\n> > We'll probably move DNS to the Kube-proxy, at which point it's not an\r\n> > issue. A fixed IP makes sense mostly so you have have the docker daemon\r\n> > trust that ip. But eventually we'll just want the ability to sign the CA\r\n> > for the cluster and distribute it to the nodes in a way that docker\r\n> > accepts.\r\n> >\r\n> \r\n> SG. Insecure registry is probably a good start for now.\r\n> \r\n> \r\n> > > There are more to consider, authentification, caching, backend storage,\r\n> > which we could provide a similar config like docker registry does.\r\n> > Particularly for backend storage, it would be nice if we can integrate\r\n> > docker registry options with PV.\r\n> > >\r\n> > Yeah, that's on our list in terms of being able to easily connect a PV to\r\n> > an RC or deployment object so you can do the transition from simple disk to\r\n> > PV\r\n> > > —\r\n> > > Reply to this email directly or view it on GitHub.\r\n> > >\r\n> >\r\n> > —\r\n> > Reply to this email directly or view it on GitHub\r\n> > <https://github.com/GoogleCloudPlatform/kubernetes/issues/1319#issuecomment-100547726>\r\n> > .\r\n> >\r\n> —\r\n> Reply to this email directly or view it on GitHub.\r\n> \r\n"}}