cleanup readme

This commit is contained in:
runseb 2016-07-06 15:19:29 +02:00
parent 1367b36c04
commit 2344ae7b5b

View File

@ -1,8 +1,8 @@
# Kubernetes compose (Kompose)
===============================
[![Build Status](https://travis-ci.org/skippbox/kompose2.svg?branch=master)](https://travis-ci.org/skippbox/kompose2)
`kompose` is a tool to help users familiar with `docker-compose` move to [Kubernetes](http://kubernetes.io) support. It takes a Docker Compose file and translates it into Kubernetes objects, it then submits those objects to a Kubernetes endpoint.
`kompose` is a tool to help users familiar with `docker-compose` move to [Kubernetes](http://kubernetes.io). It takes a Docker Compose file and translates it into Kubernetes objects, it can then submit those objects to a Kubernetes endpoint with the `kompose up` command.
`kompose` is a convenience tool to go from local Docker development to managing your application with Kubernetes. We don't assume that the transformation from docker compose format to Kubernetes API objects will be perfect, but it helps tremendously to start _Kubernetizing_ your application.
@ -51,30 +51,6 @@ postgresql 10.0.237.13 <none> 5432/TCP 1m
redisio 10.0.242.93 <none> 6379/TCP 1m
```
By default, `svc` generated by `kompose` uses `Type: ClusterIP` which means `svc` is only accessible internally. Sometimes you might be interesting to make it public from outside, simply run:
```bash
$ kubectl edit svc gitlab
```
Change Service.Spec.Type to NodePort and save.
```bash
$ kubectl describe svc gitlab
Name: gitlab
Namespace: default
Labels: service=gitlab
Selector: service=gitlab
Type: NodePort
IP: 10.0.247.129
Port: 10080 10080/TCP
NodePort: 10080 31925/TCP
Endpoints: 10.244.0.12:80
Port: 10022 10022/TCP
NodePort: 10022 30232/TCP
Endpoints: 10.244.0.12:22
Session Affinity: None
No events.
```
Then you can access to gitlab at: http://*Node_IP*:31925
kompose also allows you to list the replication controllers and services with the `ps` subcommand.
You can delete them with the `delete` subcommand.
@ -160,13 +136,15 @@ $ tree .
The `*replicaset.yaml` files contain the ReplicaSet objects
If you want to generate a Chart to be used with [Helm](https://github.com/kubernetes/helm) simply do:
```bash
$ kompose convert -c -y
$ tree docker-compose/
docker-compose/
├── Chart.yaml
├── README.md
└── manifests
└── templates
├── redis-rc.yaml
├── redis-svc.yaml
└── web-rc.yaml
@ -174,6 +152,35 @@ docker-compose/
The chart structure is aimed at providing a skeleton for building your Helm charts.
## Unsupported docker-compose configuration options
Currently `kompose` does not support the following Docker Compose options.
```
"Build", "CapAdd", "CapDrop", "CPUSet", "CPUShares", "ContainerName", "Devices", "DNS", "DNSSearch",
"Dockerfile", "DomainName", "Entrypoint", "EnvFile", "Hostname", "LogDriver", "MemLimit", "MemSwapLimit",
"Net", "Pid", "Uts", "Ipc", "ReadOnly", "StdinOpen", "SecurityOpt", "Tty", "User", "VolumeDriver",
"VolumesFrom", "Expose", "ExternalLinks", "LogOpt", "ExtraHosts",
```
For example:
```
$ cat nginx.yml
nginx:
image: nginx
dockerfile: foobar
build: ./foobar
cap_add:
- ALL
container_name: foobar
$ kompose convert -f nginx.yml
WARNING: Unsupported key Build - ignoring
WARNING: Unsupported key CapAdd - ignoring
WARNING: Unsupported key ContainerName - ignoring
WARNING: Unsupported key Dockerfile - ignoring
```
## Building
### Building with `go`
@ -195,17 +202,6 @@ $ go build -o kompose ./cli/main
$ make binary
```
## Unsupported docker-compose configuration options
Currently `kompose` does not support these below options. Some of them are not reflected into kubernetes objects.
```
"Build", "CapAdd", "CapDrop", "CPUSet", "CPUShares", "ContainerName", "Devices", "DNS", "DNSSearch",
"Dockerfile", "DomainName", "Entrypoint", "EnvFile", "Hostname", "LogDriver", "MemLimit", "MemSwapLimit",
"Net", "Pid", "Uts", "Ipc", "ReadOnly", "StdinOpen", "SecurityOpt", "Tty", "User", "VolumeDriver",
"VolumesFrom", "Expose", "ExternalLinks", "LogOpt", "ExtraHosts",
```
## Contributing and Issues
`kompose` is a work in progress, we will see how far it takes us. We welcome any pull request to make it even better.