在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):kelseyhightower/compose2kube开源软件地址(OpenSource Url):https://github.com/kelseyhightower/compose2kube开源编程语言(OpenSource Language):Go 100.0%开源软件介绍(OpenSource Introduction):compose2kubeConvert docker-compose service files to Kubernetes objects. Statuscompose2kube is in functional beta stage and supports mapping container images, varables, ports, labels, volumes, and restart policies to Kubernetes replication controllers and services. Thanks to the docker/libcompose library, compose2kube will support the complete docker-compose specification in the near future. Rancher support: (optionally) compose2kube also reads Set your GOPATH environmentFor example:
Install dependencies
Build
UsageCreate a
Test the service using the docker-compose command:
List the running services:
Stop the services:
Remove the services:
At this point the docker-compose.yml file is ready for conversion. docker-compose to KubernetesUse the compose2kube command to convert compose files to native Kubernetes objects.
By default, compose2kube will search for
Launch the Kubernetes replication controllers
List the replication controllers:
List the services:
View the service pods:
Advanced FeaturesEnvironment VariablesEnvironment variables may be injected into the container. web:
image: nginx
ports:
- "80"
- "443"
environment:
- NGINX_HOST=example.com Modifying the default commandThe default command may be overwritten with the "command" option. web:
image: nginx
ports:
- "80"
- "443"
command:
- apt update Host VolumesFor volumes, we currently only support mounting a host volume to a container. The host volume is by default writable. The web:
image: nginx
ports:
- "80"
- "443"
volumes:
- /srv/nginx/uploads:/usr/share/nginx/uploads # Writable
- /srv/nginx/html:/usr/share/nginx/html:ro # Read Only |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论