| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
10年前发布

Google开源的容器集群管理系统:Kubernetes

Kubernetes 是来自 Google 云平台的开源容器集群管理系统。基于 Docker 构建一个容器的调度服务。该系统可以自动在一个容器集群中选择一个工作容器供使用。其核心概念是 Container Pod。详细的设计思路请参考这里

Running a container (simple version)

Once you have your instances up and running, the build-go.sh script sets up your Go workspace and builds the Go components.

The cloudcfg.sh script spins up two containers, running Nginx and with port 80 mapped to 8080:

cd kubernetes  hack/build-go.sh  cluster/cloudcfg.sh -p 8080:80 run dockerfile/nginx 2 myNginx

To stop the containers:

cluster/cloudcfg.sh stop myNginx

To delete the containers:

cluster/cloudcfg.sh rm myNginx

Running a container (more complete version)

Assuming you've run hack/dev-build-and-up.sh and hack/build-go.sh:

cd kubernetes  cluster/cloudcfg.sh -c api/examples/pod.json create /pods

Where pod.json contains something like:

{    "ID": "nginx",    "desiredState": {      "image": "dockerfile/nginx",      "networkPorts": [{        "containerPort": 80,        "hostPort": 8080      }]    },    "labels": {      "name": "foo"    }  }

Look in api/examples/ for more examples

Tearing down the cluster

cd kubernetes  cluster/kube-down.sh

项目主页:http://www.open-open.com/lib/view/home/1402450771415

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1402450771415.html
Kubernetes