add examples using "rollout" (#10583)
* add examples using "rollout" since "rolling-update" is deprecated, add example using "rollout" * better deprecation reference Referenced version where `rolling-update` was deprecated Separated `rollout` example into it's own block
This commit is contained in:
committed by
k8s-ci-robot
parent
d02fc8de3f
commit
8790759a24
@@ -163,12 +163,20 @@ kubectl get events --sort-by=.metadata.creationTimestamp
|
||||
|
||||
## Updating Resources
|
||||
|
||||
As of version 1.11 `rolling-update` have been deprecated (see [CHANGELOG-1.11.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.11.md)), use `rollout` instead.
|
||||
|
||||
```bash
|
||||
kubectl rolling-update frontend-v1 -f frontend-v2.json # Rolling update pods of frontend-v1
|
||||
kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 # Change the name of the resource and update the image
|
||||
kubectl rolling-update frontend --image=image:v2 # Update the pods image of frontend
|
||||
kubectl rolling-update frontend-v1 frontend-v2 --rollback # Abort existing rollout in progress
|
||||
cat pod.json | kubectl replace -f - # Replace a pod based on the JSON passed into stdin
|
||||
kubectl set image deployment/frontend www=image:v2 # Rolling update "www" containers of "frontend" deployment, updating the image
|
||||
kubectl rollout undo deployment/frontend # Rollback to the previous deployment
|
||||
kubectl rollout status -w deployment/frontend # Watch rolling update status of "frontend" deployment until completion
|
||||
|
||||
# deprecated starting version 1.11
|
||||
kubectl rolling-update frontend-v1 -f frontend-v2.json # (deprecated) Rolling update pods of frontend-v1
|
||||
kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 # (deprecated) Change the name of the resource and update the image
|
||||
kubectl rolling-update frontend --image=image:v2 # (deprecated) Update the pods image of frontend
|
||||
kubectl rolling-update frontend-v1 frontend-v2 --rollback # (deprecated) Abort existing rollout in progress
|
||||
|
||||
cat pod.json | kubectl replace -f - # Replace a pod based on the JSON passed into std
|
||||
|
||||
# Force replace, delete and then re-create the resource. Will cause a service outage.
|
||||
kubectl replace --force -f ./pod.json
|
||||
|
||||
Reference in New Issue
Block a user