Setting up my Kubernetes Environment

To set up the Kubernetes environment I described earlier, I deployed a docker registry on raw-0, all data is contained within a volume container:

git clone https://github.com/fedora-cloud/Fedora-Dockerfiles.git
cd Fedora-Dockerfiles/registry
docker build --rm --tar="goern/registry" .
docker run --name=registry-data -v /var/lib/docker-registry fedora:20 true # to hold our data
docker run --name=registry -d -p 5000:5000 --volumes-from=registry-data goern/registry

See also at [Scott’s howto][2]. Testing if the registry and dns and docker works via

[root@raw-2 ~]# docker pull raw-0.localdomain:5000/goern/mongo Pulling repository raw-0.localdomain:5000/goern/mongo a79fce803e4c: Download complete 511136ea3c5a: Download complete c69cab00d6ef: Download complete 88b42ffd1f7c: Download complete 8d8d8f2d03f7: Download complete a3c6facc68a0: Download complete daed86b3b2da: Download complete 07bbb4fa70f5: Download complete e6c22cdf122e: Download complete [root@raw-2 ~]#

The next thing I deployed was a simple mongo container I build and pushed to my local registry using the same pattern as above.

 

[root@raw-0 ~]# cat mongo.json
{
 "id": "mongo",
 "desiredState": {
 "manifest": {
 "version": "v1beta1",
 "id": "mongo-1",
 "containers": [{
 "name": "master",
 "image": "raw-0.localdomain:5000/goern/mongo",
 "ports": [{
 "containerPort": 27017,
 "hostPort": 27017
 }, {
 "containerPort": 28017,
 "hostPort": 28017
 }]
 }]
 }
 },
 "labels": {
 "name": "apache"
 }
}
[root@raw-0 ~]# kubernetes-kubecfg -c mongo.json create pods
I0809 12:03:27.817122 03020 request.go:220] Waiting for completion of /operations/2

Name Image(s) Host Labels

———- ———- ———- ———-

mongo raw-0.localdomain:5000/goern/mongo / name=apache

[root@raw-0 ~]#

[2]: http://www.colliernotes.com/2014/03/docker-registry-in-container-on-fedora.html