From ec110ab367f250763b3ea8db50750c79ef0f1bdd Mon Sep 17 00:00:00 2001 From: kayrus Date: Mon, 15 Aug 2016 14:34:05 +0200 Subject: [PATCH] petset: added petset scale example --- docs/user-guide/petset.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/user-guide/petset.md b/docs/user-guide/petset.md index f1065d49ea..91796a4316 100644 --- a/docs/user-guide/petset.md +++ b/docs/user-guide/petset.md @@ -252,6 +252,22 @@ You can scale a Pet Set by updating the "replicas" field. Note however that the 1. Create one pet at a time, in order from {0..N-1}, and wait till each one is in [Running and Ready](/docs/user-guide/pod-states) before creating the next 2. Delete one pet at a time, in reverse order from {N-1..0}, and wait till each one is completely shutdown (past its [terminationGracePeriodSeconds](/docs/user-guide/pods/index#termination-of-pods)) before deleting the next +```shell +$ kubectl get po +NAME READY STATUS RESTARTS AGE +web-0 1/1 Running 0 30s +web-1 1/1 Running 0 36s + +$ kubectl patch petset web -p '{"spec":{"replicas":3}}' +"web" patched + +$ kubectl get po +NAME READY STATUS RESTARTS AGE +web-0 1/1 Running 0 40s +web-1 1/1 Running 0 46s +web-2 1/1 Running 0 8s +``` + ## Deleting a Pet Set Cleaning up a Pet Set is somewhat manual, as noted in the [limitations section](#alpha-limitations). You can delete a Pet Set using Kubectl, but this will *not* scale it down to 0: