mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-04 10:47:25 +00:00
Add replication controller renaming as a cleanup option.
This commit is contained in:
@@ -12,7 +12,7 @@ new PodTemplate. The new-controller.json must specify the same namespace as the
|
||||
existing controller and overwrite at least one (common) label in its replicaSelector.
|
||||
|
||||
```
|
||||
kubectl rolling-update OLD_CONTROLLER_NAME -f NEW_CONTROLLER_SPEC
|
||||
kubectl rolling-update OLD_CONTROLLER_NAME ([NEW_CONTROLLER_NAME] --image=NEW_CONTAINER_IMAGE | -f NEW_CONTROLLER_SPEC)
|
||||
```
|
||||
|
||||
### Examples
|
||||
@@ -24,9 +24,13 @@ $ 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
|
||||
// Update the pods of frontend-v1 to frontend-v2 by just changing the image, and switching the
|
||||
// name of the replication controller.
|
||||
$ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2
|
||||
|
||||
// Update the pods of frontend by just changing the image, and keeping the old name
|
||||
$ kubectl rolling-update frontend --image=image:v2
|
||||
|
||||
```
|
||||
|
||||
### Options
|
||||
@@ -79,4 +83,4 @@ $ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2
|
||||
### SEE ALSO
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-04-27 22:01:46.525154396 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-04-27 22:44:36.84341428 +0000 UTC
|
||||
|
@@ -185,9 +185,13 @@ $ 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
|
||||
// Update the pods of frontend\-v1 to frontend\-v2 by just changing the image, and switching the
|
||||
// name of the replication controller.
|
||||
$ kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-image=image:v2
|
||||
|
||||
// Update the pods of frontend by just changing the image, and keeping the old name
|
||||
$ kubectl rolling\-update frontend \-\-image=image:v2
|
||||
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
Reference in New Issue
Block a user