From b3ed1b633fae3a8b5c066104bb7ee6c731d95d20 Mon Sep 17 00:00:00 2001 From: Yifan Gu Date: Sun, 14 Feb 2016 12:13:32 +0800 Subject: [PATCH] docs/rkt: Document the different UX. --- docs/getting-started-guides/rkt/README.md | 3 + docs/getting-started-guides/rkt/notes.md | 133 ++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 docs/getting-started-guides/rkt/notes.md diff --git a/docs/getting-started-guides/rkt/README.md b/docs/getting-started-guides/rkt/README.md index 197e74b414b..ef47619d96c 100644 --- a/docs/getting-started-guides/rkt/README.md +++ b/docs/getting-started-guides/rkt/README.md @@ -206,6 +206,9 @@ See [a simple nginx example](../../../docs/user-guide/simple-nginx.md) to try ou For more complete applications, please look in the [examples directory](../../../examples/). +### Different UX with rkt container runtime + +rkt and Docker have very different designs, as well as ACI and Docker image format. Users might experience some different experience when switching from one to the other. More information can be found [here](notes.md). ### Debugging diff --git a/docs/getting-started-guides/rkt/notes.md b/docs/getting-started-guides/rkt/notes.md new file mode 100644 index 00000000000..43669aa1e0a --- /dev/null +++ b/docs/getting-started-guides/rkt/notes.md @@ -0,0 +1,133 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +# Notes on Different UX with rkt container runtime + +### Doesn't support ENTRYPOINT + CMD feature + +To run a Docker image, rkt will convert it into [App Container Image (ACI) format](https://github.com/appc/spec/blob/master/SPEC.md) first. +However, during the conversion, the `ENTRYPOINT` and `CMD` are concatentated to construct ACI's `Exec` field. +This means after the conversion, we are not able to replace only `ENTRYPOINT` or `CMD` without touching the other part. +So for now, users are recommended to specify the **executable path** in `Command` and **arguments** in `Args`. +(This has the same effect if users specify the **executable path + arguments** in `Command` or `Args` alone). + +For example: + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: nginx + labels: + name: nginx +spec: + containers: + - name: nginx + image: nginx + ports: + - containerPort: 80 +``` + +The above pod yaml file is valid as it's not specifying `Command` or `Args`, so the default `ENTRYPOINT` and `CMD` of the image will be used. + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: busybox + labels: + name: busybox +spec: + containers: + - name: busybox + image: busybox + command: + - /bin/sleep + - 1000 +``` + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: busybox + labels: + name: busybox +spec: + containers: + - name: busybox + image: busybox + command: + - /bin/sleep + args: + - 1000 +``` + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: busybox + labels: + name: busybox +spec: + containers: + - name: busybox + image: busybox + args: + - /bin/sleep + - 1000 +``` + +All the three examples above are valid as they contain both the executable path and the arguments. + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: busybox + labels: + name: busybox +spec: + containers: + - name: busybox + image: busybox + args: + - 1000 +``` + +The last example is invalid, as we cannot override just the `CMD` of the image alone. + + + + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/getting-started-guides/rkt/notes.md?pixel)]() +