First part of improved rolling update, allow dynamic next replication controller generation.

This commit is contained in:
Brendan Burns
2015-04-23 16:27:19 -07:00
parent e8b28c59c6
commit 217e6ff0d0
32 changed files with 440 additions and 60 deletions

View File

@@ -66,4 +66,4 @@ kubectl
* [kubectl update](kubectl_update.md) - Update a resource by filename or stdin.
* [kubectl version](kubectl_version.md) - Print the client and server version information.
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.406236586 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.641615471 +0000 UTC

View File

@@ -50,4 +50,4 @@ kubectl api-versions
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.405815046 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.640579424 +0000 UTC

View File

@@ -50,4 +50,4 @@ kubectl cluster-info
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.405639667 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.640382538 +0000 UTC

View File

@@ -63,4 +63,4 @@ kubectl config SUBCOMMAND
* [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file
* [kubectl config view](kubectl_config_view.md) - displays Merged kubeconfig settings or a specified kubeconfig file.
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.405466384 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.640154327 +0000 UTC

View File

@@ -65,4 +65,4 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.404357726 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.638291301 +0000 UTC

View File

@@ -58,4 +58,4 @@ $ kubectl config set-context gce --user=cluster-admin
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.40472172 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.638842283 +0000 UTC

View File

@@ -78,4 +78,4 @@ $ kubectl set-credentials cluster-admin --client-certificate=~/.kube/admin.crt -
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.40454463 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.638596132 +0000 UTC

View File

@@ -52,4 +52,4 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.404916515 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.639475859 +0000 UTC

View File

@@ -51,4 +51,4 @@ kubectl config unset PROPERTY_NAME
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.405094144 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.639702273 +0000 UTC

View File

@@ -50,4 +50,4 @@ kubectl config use-context CONTEXT_NAME
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.405277784 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.639928664 +0000 UTC

View File

@@ -73,4 +73,4 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.404151238 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.638011058 +0000 UTC

View File

@@ -63,4 +63,4 @@ $ cat pod.json | kubectl create -f -
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.400230448 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.633893126 +0000 UTC

View File

@@ -81,4 +81,4 @@ $ kubectl delete pods --all
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.400618492 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.634491315 +0000 UTC

View File

@@ -63,4 +63,4 @@ $ kubectl describe pods/nginx
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 21:21:05.485819349 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.633584776 +0000 UTC

View File

@@ -64,4 +64,4 @@ $ kubectl exec -p 123456-7890 -c ruby-container -i -t -- bash -il
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.401622652 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.636226358 +0000 UTC

View File

@@ -82,4 +82,4 @@ $ kubectl expose streamer --port=4100 --protocol=udp --service-name=video-stream
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.403631642 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.637486796 +0000 UTC

View File

@@ -85,4 +85,4 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.399795546 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.633184922 +0000 UTC

View File

@@ -81,4 +81,4 @@ $ kubectl label pods foo bar-
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.403876136 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.637727935 +0000 UTC

View File

@@ -62,4 +62,4 @@ $ kubectl log -f 123456-7890 ruby-container
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.400998066 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.634970712 +0000 UTC

View File

@@ -53,4 +53,4 @@ kubectl namespace [namespace]
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.400806182 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.634703492 +0000 UTC

View File

@@ -68,4 +68,4 @@ $ kubectl port-forward -p mypod 0:5000
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.40181203 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.636454335 +0000 UTC

View File

@@ -65,4 +65,4 @@ $ kubectl proxy --api-prefix=k8s-api
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.402034031 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.636689051 +0000 UTC

View File

@@ -68,4 +68,4 @@ $ kubectl resize --current-replicas=2 --replicas=3 replicationcontrollers foo
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.401412855 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.635916597 +0000 UTC

View File

@@ -23,14 +23,25 @@ $ kubectl rolling-update frontend-v1 -f frontend-v2.json
// Update pods of frontend-v1 using JSON data passed into stdin.
$ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -
// Update the pods of frontend-v1 to frontend-v2 by just changing the image
$ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2
```
### Options
```
--deployment-label-key="deployment": The key to use to differentiate between two different controllers, default 'deployment'. Only relevant when --image is specified, ignored otherwise
--dry-run=false: If true, print out the changes that would be made, but don't actually make them.
-f, --filename="": Filename or URL to file to use to create the new controller.
-h, --help=false: help for rolling-update
--image="": Image to upgrade the controller to. Can not be used with --filename/-f
--no-headers=false: When using the default output, don't print headers.
-o, --output="": Output format. One of: json|yaml|template|templatefile.
--output-version="": Output the formatted object with the given version (default api-version).
--poll-interval="3s": Time delay between polling controller status after update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
--timeout="5m0s": Max time to wait for a controller to update before giving up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
--update-period="1m0s": Time to wait between updating pods. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
```
@@ -68,4 +79,4 @@ $ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.401210692 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-24 04:16:19.186748349 +0000 UTC

View File

@@ -78,4 +78,4 @@ $ kubectl run-container nginx --image=nginx --overrides='{ "apiVersion": "v1beta
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.402296924 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.636970945 +0000 UTC

View File

@@ -72,4 +72,4 @@ $ kubectl stop -f path/to/resources
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.402507426 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.637194082 +0000 UTC

View File

@@ -67,4 +67,4 @@ $ kubectl update pods my-pod --patch='{ "apiVersion": "v1beta1", "desiredState":
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.400435658 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.634205944 +0000 UTC

View File

@@ -51,4 +51,4 @@ kubectl version
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-23 00:47:55.405995955 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-23 23:29:05.640847018 +0000 UTC

View File

@@ -22,6 +22,14 @@ existing controller and overwrite at least one (common) label in its replicaSele
.SH OPTIONS
.PP
\fB\-\-deployment\-label\-key\fP="deployment"
The key to use to differentiate between two different controllers, default 'deployment'. Only relevant when \-\-image is specified, ignored otherwise
.PP
\fB\-\-dry\-run\fP=false
If true, print out the changes that would be made, but don't actually make them.
.PP
\fB\-f\fP, \fB\-\-filename\fP=""
Filename or URL to file to use to create the new controller.
@@ -30,10 +38,31 @@ existing controller and overwrite at least one (common) label in its replicaSele
\fB\-h\fP, \fB\-\-help\fP=false
help for rolling\-update
.PP
\fB\-\-image\fP=""
Image to upgrade the controller to. Can not be used with \-\-filename/\-f
.PP
\fB\-\-no\-headers\fP=false
When using the default output, don't print headers.
.PP
\fB\-o\fP, \fB\-\-output\fP=""
Output format. One of: json|yaml|template|templatefile.
.PP
\fB\-\-output\-version\fP=""
Output the formatted object with the given version (default api\-version).
.PP
\fB\-\-poll\-interval\fP="3s"
Time delay between polling controller status after update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
.PP
\fB\-t\fP, \fB\-\-template\fP=""
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
.PP
\fB\-\-timeout\fP="5m0s"
Max time to wait for a controller to update before giving up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
@@ -156,6 +185,10 @@ $ kubectl rolling\-update frontend\-v1 \-f frontend\-v2.json
// Update pods of frontend\-v1 using JSON data passed into stdin.
$ cat frontend\-v2.json | kubectl rolling\-update frontend\-v1 \-f \-
// Update the pods of frontend\-v1 to frontend\-v2 by just changing the image
$ kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-image=image:v2
.fi
.RE