From b60e2fe33436f51a097e0da159ac7a0b0011bf4f Mon Sep 17 00:00:00 2001 From: Steve Perry Date: Tue, 28 Mar 2017 19:49:43 -0700 Subject: [PATCH] More (#2966) --- _data/tasks.yml | 1 + _layouts/docwithnav.html | 1 - docs/tools/kompose/user-guide.md | 41 +++++++++++++++++++++++++++++++- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/_data/tasks.yml b/_data/tasks.yml index 10d09ce93d..33619c0988 100644 --- a/_data/tasks.yml +++ b/_data/tasks.yml @@ -27,6 +27,7 @@ toc: - docs/tasks/configure-pod-container/configure-pod-initialization.md - docs/tasks/configure-pod-container/attach-handler-lifecycle-event.md - docs/tasks/configure-pod-container/configure-pod-disruption-budget.md + - docs/tools/kompose/user-guide.md - title: Running Applications section: diff --git a/_layouts/docwithnav.html b/_layouts/docwithnav.html index e1baa01d47..2660212762 100755 --- a/_layouts/docwithnav.html +++ b/_layouts/docwithnav.html @@ -28,7 +28,6 @@
  • TASKS
  • CONCEPTS
  • REFERENCE
  • -
  • TOOLS
  • SAMPLES
  • SUPPORT
  • diff --git a/docs/tools/kompose/user-guide.md b/docs/tools/kompose/user-guide.md index d9a7548e75..587b026a1e 100644 --- a/docs/tools/kompose/user-guide.md +++ b/docs/tools/kompose/user-guide.md @@ -3,12 +3,51 @@ assignees: - cdrage -title: Kompose User Guide +title: Translating a Docker Compose File to Kubernetes Resources +redirect_from: +- "/docs/tools/kompose/" +- "/docs/tools/kompose/index.html" --- * TOC {:toc} +`kompose` is a tool to help users who are familiar with `docker-compose` move to **Kubernetes**. `kompose` takes a Docker Compose file and translates it into Kubernetes resources. + +`kompose` is a convenience tool to go from local Docker development to managing your application with Kubernetes. Transformation of the Docker Compose format to Kubernetes resources manifest may not be exact, but it helps tremendously when first deploying an application on Kubernetes. + +## Use Case + +If you have a Docker Compose `docker-compose.yml` or a Docker Distributed Application Bundle `docker-compose-bundle.dab` file, you can convert it into Kubernetes deployments and services like this: + +```console +$ kompose --bundle docker-compose-bundle.dab convert +WARN[0000]: Unsupported key networks - ignoring +file "redis-svc.yaml" created +file "web-svc.yaml" created +file "web-deployment.yaml" created +file "redis-deployment.yaml" created + +$ kompose -f docker-compose.yml convert +WARN[0000]: Unsupported key networks - ignoring +file "redis-svc.yaml" created +file "web-svc.yaml" created +file "web-deployment.yaml" created +file "redis-deployment.yaml" created +``` + +## Installation + +Grab the latest [release](https://github.com/kubernetes-incubator/kompose/releases) for your OS, untar and extract the binary. + +### Linux + +```sh +wget https://github.com/kubernetes-incubator/kompose/releases/download/v0.1.2/kompose_linux-amd64.tar.gz +tar -xvf kompose_linux-amd64.tar.gz --strip 1 +sudo mv kompose /usr/local/bin +``` + Kompose has support for two providers: OpenShift and Kubernetes. You can choose targeted provider either using global option `--provider`, or by setting environment variable `PROVIDER`. By setting environment variable `PROVIDER` you can permanently switch to OpenShift provider without need to always specify `--provider openshift` option.