Add new Kompose site (#1474)

This PR adds the new Kompose site!

Go preview it at https://kompose.io

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
This commit is contained in:
Charlie Drage
2022-01-13 13:55:50 -05:00
committed by GitHub
parent a9d05d509d
commit ff4a65c08a
101 changed files with 14734 additions and 99 deletions
+2
View File
@@ -1,8 +1,10 @@
---
layout: default
permalink: /architecture/
title: Architecture
redirect_from:
- /docs/architecture.md/
- /docs/architecture/
---
# Architecture and Internal Design
+109 -84
View File
@@ -1,17 +1,41 @@
---
layout: default
title: Conversion
permalink: /conversion/
redirect_from:
- /docs/conversion.md/
- /docs/conversion/
---
# Conversion Matrix
This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts. This covers *major* versions of Docker Compose such as 1, 2 and 3.
* TOC
{:toc}
The current table covers all **current** possible Docker Compose keys.
This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts.
__Note:__ We don't support anything 3.4 and above at the moment.
## Version Table
| Supported | Compose Version | Docker Engine Version |
|------------|-----------------|-----------------------|
| N | 3.8 | 19.03.0+ |
| N | 3.7 | 18.06.0+ |
| N | 3.6 | 18.02.0+ |
| N | 3.5 | 17.12.0+ |
| N | 3.4 | 17.09.0+ |
| Y | 3.3 | 17.06.0+ |
| Y | 3.2 | 17.04.0+ |
| Y | 3.1 | 1.13.1+ |
| Y | 3.0 | 1.13.0+ |
| Y | 2.4 | 17.12.0+ |
| Y | 2.3 | 17.06.0+ |
| Y | 2.2 | 1.13.0+ |
| Y | 2.1 | 1.12.0+ |
| Y | 2.0 | 1.10.0+ |
**Note:** We don't support anything 3.4 and above at the moment. It is reccomended to specify `version: "3.3"` in your `docker-compose.yaml` and converting. We use a library called [libcompose](https://github.com/docker/libcompose) that supports up to version `3.3`. If you are interested in adding additional support, please open up a PR!
## Conversion Table
__Glossary:__
@@ -20,84 +44,85 @@ __Glossary:__
- __n:__ Not yet implemented
- __x:__ Not applicable / no 1-1 conversion
| Keys | V1 | V2 | V3 | Kubernetes / OpenShift | Notes |
|------------------------|----|----|----|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
| build | ✓ | ✓ | ✓ | | Builds/Pushes to Docker repository. See [user guide on build and push image](https://kompose.io/user-guide/#build-and-push-image) | |
| build: context | ✓ | ✓ | ✓ | | |
| build: dockerfile | ✓ | ✓ | ✓ | | |
| build: args | n | n | n | | |
| build: cache_from | - | - | n | | |
| cap_add, cap_drop | ✓ | ✓ | ✓ | Pod.Spec.Container.SecurityContext.Capabilities.Add/Drop | |
| command | ✓ | ✓ | ✓ | Pod.Spec.Container.Args | |
| configs | n | n | ✓ | | |
| configs: short-syntax | n | n | ✓ | | Only create configMap |
| configs: long-syntax | n | n | ✓ | | If target path is /, ignore this and only create configMap |
| cgroup_parent | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/11986 |
| container_name | ✓ | ✓ | | Metadata.Name + Deployment.Spec.Containers.Name | |
| credential_spec | x | x | x | | Only applicable to Windows containers |
| deploy | - | - | | | |
| deploy: mode | - | - | ✓ | | |
| deploy: replicas | - | - | ✓ | Deployment.Spec.Replicas / DeploymentConfig.Spec.Replicas | |
| deploy: placement | - | - | ✓ | Pod.Spec.Affinity | |
| deploy: update_config | - | - | ✓ | Workload.Spec.Strategy | Deployment / DeploymentConfig |
| deploy: resources | - | - | ✓ | Containers.Resources.Limits.Memory / Containers.Resources.Limits.CPU | Support for memory as well as cpu |
| deploy: restart_policy | - | - | ✓ | Pod generation | This generated a Pod, see the [user guide on restart](http://kompose.io/user-guide/#restart) |
| deploy: labels | - | - | ✓ | Workload.Metadata.Labels | Only applied to workload resource | |
| devices | x | x | x | | Not supported within Kubernetes, See issue https://github.com/kubernetes/kubernetes/issues/5607 |
| depends_on | x | x | x | | |
| dns | x | x | x | | Not used within Kubernetes. Kubernetes uses a managed DNS server |
| dns_search | x | x | x | | See `dns` key |
| domainname | | | ✓ | Pod.Spec.SubDomain |
| tmpfs | ✓ | ✓ | ✓ | Pod.Spec.Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container |
| entrypoint | ✓ | ✓ | ✓ | Pod.Spec.Container.Command | |
| env_file | n | n | ✓ | | |
| environment | | ✓ | ✓ | Pod.Spec.Container.Env | |
| expose | ✓ | ✓ | ✓ | Service.Spec.Ports
| endpoint_mode | n | n | ✓ | | If endpoint_mode=vip, the created Service will be forced to set to NodePort type |
| extends | | | ✓ | | Extends by utilizing the same image supplied |
| external_links | x | x | x | | Kubernetes uses a flat-structure for all containers and thus external_links does not have a 1-1 conversion |
| extra_hosts | n | n | n | | |
| group_add | | | | | |
| healthcheck | - | n | ✓ | | |
| hostname | | ✓ | ✓ | Pod.Spec.HostName | |
| image | ✓ | ✓ | ✓ | Deployment.Spec.Containers.Image | |
| isolation | x | x | x | | Not applicable as this applies to Windows with HyperV support |
| labels | | | | Metadata.Annotations | |
| links | x | x | x | | All containers in the same pod are accessible in Kubernetes |
| logging | x | x | x | | Kubernetes has built-in logging support at the node-level |
| network_mode | x | x | x | | Kubernetes uses its own cluster networking |
| networks | | | | | See `networks` key |
| networks: aliases | x | x | x | | See `networks` key |
| networks: addresses | x | x | x | | See `networks` key |
| pid | ✓ | ✓ | ✓ | Pod.Spec.HostPID | |
| ports | ✓ | ✓ | ✓ | Service.Spec.Ports | |
| ports: short-syntax | ✓ | ✓ | ✓ | Service.Spec.Ports | |
| ports: long-syntax | - | - | ✓ | Service.Spec.Ports | |
| secrets | - | - | ✓ | Secret | External Secret is not Supported |
| secrets: short-syntax | - | - | ✓ | Secret | External Secret is not Supported |
| secrets: long-syntax | - | - | ✓ | Secret | External Secret is not Supported |
| security_opt | x | x | x | | Kubernetes uses its own container naming scheme |
| stop_grace_period | | | | Pod.Spec.TerminationGracePeriodSeconds | |
| stop_signal | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/30051 |
| sysctls | n | n | n | | |
| ulimits | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/3595 |
| userns_mode | x | x | x | | Not supported within Kubernetes and ignored in Docker Compose Version 3 |
| volumes | | | | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
| volumes: short-syntax | ✓ | ✓ | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
| volumes: long-syntax | - | - | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
| restart | | | ✓ | | |
| | | | | | |
| __Volume__ | x | x | x | | |
| driver | x | x | x | | |
| driver_opts | x | x | x | | |
| external | x | x | x | | |
| labels | x | x | x | | |
| | | | | | |
| __Network__ | x | x | x | | |
| driver | x | x | x | | |
| driver_opts | x | x | x | | |
| enable_ipv6 | x | x | x | | |
| ipam | x | x | x | | |
| internal | x | x | x | | |
| labels | x | x | x | | |
| external | x | x | x | | |
| Keys | V1 | V2 | V3 | Kubernetes / OpenShift | Notes |
|------------------------|----|----|----|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| build | ✓ | ✓ | ✓ | | Builds/Pushes to Docker repository. See [user guide on build and push image](https://kompose.io/user-guide/#build-and-push-image) |
| build: context | ✓ | ✓ | ✓ | | |
| build: dockerfile | ✓ | ✓ | ✓ | | |
| build: args | n | n | n | | |
| build: cache_from | - | - | n | | |
| cap_add | ✓ | ✓ | ✓ | Container.SecurityContext.Capabilities.Add | |
| cap_drop | ✓ | ✓ | ✓ | Container.SecurityContext.Capabilities.Drop | |
| command | | | ✓ | Container.Args | |
| configs | n | n | ✓ | | |
| configs: short-syntax | n | n | ✓ | | Only create configMap |
| configs: long-syntax | n | n | | | If target path is /, ignore this and only create configMap |
| cgroup_parent | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/11986 |
| container_name | | | | Metadata.Name + Deployment.Spec.Containers.Name | |
| credential_spec | x | x | x | | Only applicable to Windows containers |
| deploy | - | - | ✓ | | |
| deploy: mode | - | - | ✓ | | |
| deploy: replicas | - | - | ✓ | Deployment.Spec.Replicas / DeploymentConfig.Spec.Replicas | |
| deploy: placement | - | - | ✓ | Affinity | |
| deploy: update_config | - | - | ✓ | Workload.Spec.Strategy | Deployment / DeploymentConfig |
| deploy: resources | - | - | ✓ | Containers.Resources.Limits.Memory / Containers.Resources.Limits.CPU | Support for memory as well as cpu |
| deploy: restart_policy | - | - | ✓ | Pod generation | This generated a Pod, see the [user guide on restart](http://kompose.io/user-guide/#restart) |
| deploy: labels | - | - | | Workload.Metadata.Labels | Only applied to workload resource |
| devices | x | x | x | | Not supported within Kubernetes, See issue https://github.com/kubernetes/kubernetes/issues/5607 |
| depends_on | x | x | x | | |
| dns | x | x | x | | Not used within Kubernetes. Kubernetes uses a managed DNS server |
| dns_search | x | x | x | | See `dns` key |
| domainname | ✓ | ✓ | ✓ | SubDomain | |
| tmpfs | ✓ | ✓ | ✓ | Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container |
| entrypoint | | | ✓ | Container.Command | |
| env_file | n | n | ✓ | | |
| environment | ✓ | ✓ | ✓ | Container.Env | |
| expose | | | ✓ | Service.Spec.Ports | |
| endpoint_mode | n | n | ✓ | | If endpoint_mode=vip, the created Service will be forced to set to NodePort type |
| extends | | | | | Extends by utilizing the same image supplied |
| external_links | x | x | x | | Kubernetes uses a flat-structure for all containers and thus external_links does not have a 1-1 conversion |
| extra_hosts | n | n | n | | |
| group_add | | | ✓ | | |
| healthcheck | - | n | ✓ | | |
| hostname | ✓ | ✓ | ✓ | HostName | |
| image | | | | Deployment.Spec.Containers.Image | |
| isolation | x | x | x | | Not applicable as this applies to Windows with HyperV support |
| labels | ✓ | | | Metadata.Annotations | |
| links | x | x | x | | All containers in the same pod are accessible in Kubernetes |
| logging | x | x | x | | Kubernetes has built-in logging support at the node-level |
| network_mode | x | x | x | | Kubernetes uses its own cluster networking |
| networks | | | | | See `networks` key |
| networks: aliases | x | x | x | | See `networks` key |
| networks: addresses | x | x | x | | See `networks` key |
| pid | ✓ | ✓ | ✓ | HostPID | |
| ports | ✓ | ✓ | ✓ | Service.Spec.Ports | |
| ports: short-syntax | | | ✓ | Service.Spec.Ports | |
| ports: long-syntax | - | - | ✓ | Service.Spec.Ports | |
| secrets | - | - | ✓ | Secret | External Secret is not Supported |
| secrets: short-syntax | - | - | ✓ | Secret | External Secret is not Supported |
| secrets: long-syntax | - | - | | Secret | External Secret is not Supported |
| security_opt | x | x | x | | Kubernetes uses its own container naming scheme |
| stop_grace_period | ✓ | ✓ | | TerminationGracePeriodSeconds | |
| stop_signal | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/30051 |
| sysctls | n | n | n | | |
| ulimits | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/3595 |
| userns_mode | x | x | x | | Not supported within Kubernetes and ignored in Docker Compose Version 3 |
| volumes | ✓ | ✓ | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
| volumes: short-syntax | | | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
| volumes: long-syntax | - | - | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
| restart | | | | | |
| | | | | | |
| __Volume__ | x | x | x | | |
| driver | x | x | x | | |
| driver_opts | x | x | x | | |
| external | x | x | x | | |
| labels | x | x | x | | |
| | | | | | |
| __Network__ | x | x | x | | |
| driver | x | x | x | | |
| driver_opts | x | x | x | | |
| enable_ipv6 | x | x | x | | |
| ipam | x | x | x | | |
| internal | x | x | x | | |
| labels | x | x | x | | |
| external | x | x | x | | |
+2
View File
@@ -1,8 +1,10 @@
---
layout: default
permalink: /development/
title: Development
redirect_from:
- /docs/development.md/
- /docs/development/
---
# Development Guide
+2 -2
View File
@@ -1,8 +1,10 @@
---
layout: default
permalink: /getting-started/
title: Getting Started
redirect_from:
- /docs/getting-started.md/
- /docs/getting-started/
---
# Getting Started
@@ -155,8 +157,6 @@ INFO OpenShift file "redis-slave-deploymentconfig.yaml" created
INFO OpenShift file "redis-slave-imagestream.yaml" created
```
Alternatively, you can convert and deploy directly to OpenShift with `kompose up --provider=openshift`.
Then you can use `kubectl apply` to create these resources in OpenShift cluster.
__Access the newly deployed service:__
+15 -10
View File
@@ -1,15 +1,20 @@
---
layout: default
permalink: /installation/
title: Installation
redirect_from:
- /docs/installation.md/
- /docs/installation/
---
# Installation
* TOC
{:toc}
We have multiple ways to install Kompose. Our preferred method is downloading the binary from the latest GitHub release.
#### GitHub release
## GitHub release
Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases).
@@ -30,7 +35,7 @@ __Windows:__
Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.26.1/kompose-windows-amd64.exe) and add the binary to your PATH.
#### Go
## Go
Installing using `go get` pulls from the master branch with the latest development changes.
@@ -38,7 +43,7 @@ Installing using `go get` pulls from the master branch with the latest developme
go get -u github.com/kubernetes/kompose
```
#### CentOS
## CentOS
Kompose is in [EPEL](https://fedoraproject.org/wiki/EPEL) CentOS repository.
If you don't have [EPEL](https://fedoraproject.org/wiki/EPEL) repository already installed and enabled you can do it by running `sudo yum install epel-release`
@@ -49,14 +54,14 @@ If you have [EPEL](https://fedoraproject.org/wiki/EPEL) enabled in your system,
sudo yum -y install kompose
```
#### Fedora
## Fedora
Kompose is in Fedora 24, 25 and 26 repositories. You can install it just like any other package.
```bash
sudo dnf -y install kompose
```
#### Ubuntu/Debian
## Ubuntu/Debian
A deb package is released for compose. Download latest package in the assets in [github releases](https://github.com/kubernetes/kompose/releases).
@@ -65,7 +70,7 @@ wget https://github.com/kubernetes/kompose/releases/download/v1.26.1/kompose_1.2
sudo apt install ./kompose_1.26.1_amd64.deb
```
#### macOS
## macOS
On macOS you can install latest release via [Homebrew](https://brew.sh) or [MacPorts](https://www.macports.org/).
```bash
@@ -76,14 +81,14 @@ brew install kompose
port install kompose
```
#### Windows
## Windows
Kompose can be installed via [Chocolatey](https://chocolatey.org/packages/kubernetes-kompose)
```console
choco install kubernetes-kompose
```
#### openSUSE/SLE
## openSUSE/SLE
Kompose is available in the official Virtualization:containers repository for openSUSE Tumbleweed, Leap 15, Leap 42.3 and SUSE Linux Enterprise 15.
Head over to [software.opensuse.org for One-Click Installation](https://software.opensuse.org//download.html?project=Virtualization%3Acontainers&package=kompose) or add the repository manually:
@@ -106,7 +111,7 @@ sudo zypper refresh
sudo zypper install kompose
```
#### NixOS
## NixOS
To install from [Nixpkgs](https://github.com/NixOS/nixpkgs), use [nix-env](https://nixos.org/manual/nix/stable/command-ref/nix-env.html).
@@ -121,7 +126,7 @@ nix-shell -p kompose --run "kompose convert"
```
#### Docker
## Docker
You can build an image from the offical repo for [Docker](https://docs.docker.com/engine/reference/commandline/build/) or [Podman](https://docs.podman.io/en/latest/markdown/podman-build.1.html):
+2
View File
@@ -1,8 +1,10 @@
---
layout: default
permalink: /integrations/
title: Integrations
redirect_from:
- /docs/integrations.md/
- /docs/integrations/
---
# Integrations
+2
View File
@@ -1,8 +1,10 @@
---
layout: default
permalink: /maven-example/
title: Maven Example
redirect_from:
- /docs/maven-example.md/
- /docs/maven-example/
---
# Fabric8 Maven Plugin + Kompose:
Executable → Regular
+2
View File
@@ -1,8 +1,10 @@
---
layout: default
permalink: /user-guide/
title: User Guide
redirect_from:
- /docs/user-guide.md/
- /docs/user-guide/
---
# User Guide