-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Task: upgrading from PetSet to StatefulSet #1704
Add Task: upgrading from PetSet to StatefulSet #1704
Conversation
@@ -0,0 +1,92 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubernetes/docs should I put assignees:
here? It's not in the template, but I assume it works for all docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added assignee
#### Create Stateful Sets | ||
|
||
Now, you want to recreate all Pet Sets, but turning them into Stateful Sets. To do this, for every Pet Set config file you have, | ||
change `apiVersion` from `apps/v1alpha1` to `apps/v1beta1` and change `kind` from `PetSet` to `StatefulSet`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we ask the users to add the initialized=false annotation if not set in the original petset config file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this
|
||
* **Stateful Set is the new Pet Set**: Pet Set is no longer available in any Kubernetes release >= 1.5. It becomes beta Stateful Set. | ||
* **Stateful Set fencing**: Fencing guards is implemented in >= 1.5 to prevent split brain scenarios for Stateful Sets. | ||
* **Flipped debug hook behavior**: The behavior of debug hook for Pet Set, i.e. annotation `pod.alpha.kubernetes.io/initialized`, is now flipped for Stateful Sets. The absence of this annotation will pause the Pet Sets, but will NOT pause the Stateful Sets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we summarize this by recommending that in most cases you should now remove this annotation from all your StatefulSet manifests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
### Differences between alpha Pet Sets and beta Stateful Sets | ||
|
||
Pet Set was introduced as an alpha resource in Kubernetes release 1.3, and was renamed to Stateful Set as a beta resource in 1.5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to link to the community vote thread for the rename? As a user, I would be confused at this point why it was renamed and why "Stateful Set" was chosen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link to the issue
|
||
- title: Stateful Set | ||
section: | ||
- title: Upgrade from PetSet to Stateful Sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it sounds better to keep everything singular (s/sets/set/ig
) and consistent (e.g. the title says PetSet
but the URL below is petsets
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also is there any reason PetSet is one word but Stateful Set is two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to two words. But keep is as plural to be consistent with other documents
Here are some notable changes: | ||
|
||
* **Stateful Set is the new Pet Set**: Pet Set is no longer available in any Kubernetes release >= 1.5. It becomes beta Stateful Set. | ||
* **Stateful Set fencing**: Fencing guards is implemented in >= 1.5 to prevent split brain scenarios for Stateful Sets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: link to doc about fencing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
$ kubectl get petsets --all-namespaces -o yaml > all-petsets.yaml | ||
``` | ||
|
||
#### Delete all Pet Sets, non-cascadingly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest "without cascading" instead of "non-cascadingly".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
#### Delete all Pet Sets, non-cascadingly | ||
|
||
If you find existing Pet Sets instead, you need to delete all Pet Sets *non-cascadingly*. You can do this from `kubectl` with `--cascade=false`. | ||
Note that if the flag wasn't set, cascading deletion will be performed by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this Note should be big and loud, and say this will delete all your pods if you let it cascade. Do we have a template for "Warning" text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is bold loud enough?
$ kubectl get petsets --all-namespaces | ||
``` | ||
|
||
At this moment, you've deleted all Pet Sets in your cluster, but not their pods, persistent volumes, or persistent volume claims. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps note the implications of this state, e.g. the pods will be vulnerable to node failures until you finish the upgrade and recreate StatefulSets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
|
||
At this moment, you've deleted all Pet Sets in your cluster, but not their pods, persistent volumes, or persistent volume claims. | ||
|
||
#### Upgrade your Kubernetes cluster to >= 1.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear, there's no way to keep the petsets around until after the upgrade? I thought I overheard someone saying that was possible, but I guess it makes sense that the controller code would be gone anyway so even if the API objects existed, it wouldn't do any good.
#### Create Stateful Sets | ||
|
||
Now, you want to recreate all Pet Sets, but turning them into Stateful Sets. To do this, for every Pet Set config file you have, | ||
change `apiVersion` from `apps/v1alpha1` to `apps/v1beta1` and change `kind` from `PetSet` to `StatefulSet`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a practical level, it's probably best to prepare these updated files before actually deleting the petsets, to minimize downtime of the controller. I'm not sure what's the best place to mention that. Would it make sense to describe the file modifications as the first step up above, when you say to either gather or download the YAML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this step and move to before deleting Pet Sets
Review status: 0 of 3 files reviewed at latest revision, 11 unresolved discussions. docs/tasks/index.md, line 26 at r1 (raw file):
PetSet should probably be Pet Sets docs/tasks/stateful-set/upgrade-from-petsets-to-stateful-sets.md, line 51 at r1 (raw file):
|
@@ -23,4 +23,7 @@ toc: | |||
section: | |||
- title: Assigning Pods to Nodes | |||
path: /docs/tasks/administer-cluster/assign-pods-nodes/ | |||
|
|||
- title: Stateful Sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed other section titles above have the form of "Doing something" rather than just a noun. Should we call our new section something like "Managing Stateful Applications"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Here are some notable changes: | ||
|
||
* **Stateful Set is the new Pet Set**: Pet Set is no longer available in any Kubernetes release >= 1.5. It becomes beta Stateful Set. To know why the name is changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430). | ||
* **Stateful Set fencing**: Fencing guards is implemented in >= 1.5 to prevent split brain scenarios for Stateful Sets. *TODO: Link to doc about fencing* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guards "are"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
* **Stateful Set is the new Pet Set**: Pet Set is no longer available in any Kubernetes release >= 1.5. It becomes beta Stateful Set. To know why the name is changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430). | ||
* **Stateful Set fencing**: Fencing guards is implemented in >= 1.5 to prevent split brain scenarios for Stateful Sets. *TODO: Link to doc about fencing* | ||
* **Flipped debug hook behavior**: The behavior of debug hook for Pet Set, i.e. annotation `pod.alpha.kubernetes.io/initialized`, is now flipped for Stateful Sets. The absence of this annotation will pause the Pet Sets, but will NOT pause the Stateful Sets. In most cases, you no longer need this annotation in your Stateful Set manifests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saying "The behavior [...] is now flipped" might sound like specifying "true" will now trigger the behavior that used to be triggered by "false" and vice versa. "debug hook" also needs a "the".
To be precise, I recommend something like:
The default value of the debug annotation (`pod.alpha.kubernetes.io/initialized`) is now `true`. The absence...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
* **Stateful Set is the new Pet Set**: Pet Set is no longer available in any Kubernetes release >= 1.5. It becomes beta Stateful Set. To know why the name is changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430). | ||
* **Stateful Set fencing**: Fencing guards are implemented in >= 1.5 to prevent split brain scenarios for Stateful Sets. *TODO: Link to doc about fencing* | ||
* **Flipped debug hook behavior**: The default value of the debug annotation (`pod.alpha.kubernetes.io/initialized`) is now `true`. The absence of this annotation will pause the Pet Sets, but will NOT pause the Stateful Sets. In most cases, you no longer need this annotation in your Stateful Set manifests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/debug hook/debug annotation/ ?
also, "The absence of this annotation will not pause Stateful Set operations" seems like a clearer thing to say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Here are some notable changes: | ||
|
||
* **Stateful Set is the new Pet Set**: Pet Set is no longer available in any Kubernetes release >= 1.5. It becomes beta Stateful Set. To know why the name is changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430). | ||
* **Stateful Set fencing**: Fencing guards are implemented in >= 1.5 to prevent split brain scenarios for Stateful Sets. *TODO: Link to doc about fencing* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the word "fencing" shouldn't be in user-facing documentation.
Stateful Sets now guarantee at-most-one semantics to ensure exactly one instance of each pod running anywhere in a cluster, in order to guard against split brain scenarios with distributed applications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
1. Change `apiVersion` from `apps/v1alpha1` to `apps/v1beta1` | ||
2. Change `kind` from `PetSet` to `StatefulSet` | ||
3. If you have the debug hook annotation `pod.alpha.kubernetes.io/initialized` set to `true`, you may remove it since it's redundant. If you don't have this annotation, you should add one, with the value set to `false`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should explain here what it means to add that annotation with "false"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
|
||
#### Create Stateful Sets | ||
|
||
Now, you want to recreate all Pet Sets, but turning them into Stateful Sets. To do this, just create all Stateful Set manifests you generate in the previous step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, you want to recreate all Pet Sets, but turning them into Stateful Sets
This sentence seems a bit confusing. Maybe we can mention that we now create Stateful Sets objects which will adopt the pods belonging to the Pet Set objects formerly.
Here are some notable changes: | ||
|
||
* **Stateful Set is the new Pet Set**: Pet Set is no longer available in any Kubernetes release >= 1.5. It becomes beta Stateful Set. To know why the name is changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430). | ||
* **Stateful Set guards against split brain**: Stateful Sets guarantee at-most-one semantics to ensure exactly one instance of each pod running anywhere in a cluster, in order to guard against split brain scenarios with distributed applications. *TODO: Link to doc about fencing* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase "exactly one" contradicts "at-most-one". To avoid having to say "at most one" twice in the sentence, you could say, "Stateful Sets guarantee at most one pod for a given ordinal index can be running anywhere in the cluster".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
#### Create Stateful Sets | ||
|
||
You need to create Stateful Sets to adopt the pods belonging to the deleted Pet Sets. | ||
To do this, just create all Stateful Set manifests you generate in the previous step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generated*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
At this moment, you've deleted all Pet Sets in your cluster, but not their pods, persistent volumes, or persistent volume claims. | ||
However, since the pods are not managed by Pet Sets anymore, they will be vulnerable to node failures until you finish the upgrade and recreate Stateful Sets. | ||
|
||
#### Upgrade your Kubernetes cluster to >= 1.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say to upgrade kubectl
as well? It seems necessary in order to run the commands below like kubectl get statefulsets
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this section
|
||
### Upgrading from Pet Sets to Stateful Sets | ||
|
||
#### Find all Pet Sets and their manifests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention that you need to keep the old kubectl
version to run these commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you man by "keep the old kubectl version". Would you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was worried that if the user upgrades to kubectl from v1.4 to v1.5 first, then the following (kubectl get petsets
) would not work. I tested it just now and it does seem to work, but there may be some unexpected results. For example, I did kubectl delete petset <name>
with kubectl v1.5 and it did delete the petset, but it didn't scale it down first. I'm guessing that's because the scale-down is initiated by kubectl on the client side, so if you delete a type that the client doesn't know about, it will be the same as --cascade=false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubectl
is backward compatible. So yes, you can do kubectl get petset
with 1.5 kubectl + 1.4 cluster.
--cascade=true
logic is baked into kubectl
(implemented via Reaper
in the code). We get the reaper of a resource to do cascading deletion. Since 1.5 kubectl doesn't have PetSetReaper anymore, it doesn't support cascading deletion for PetSet. This wouldn't make a difference in this case, since we're asking users to do --cascade=false
. Do you think it's still necessary to make them not upgrade the kubectl yet? (I'm now leaning towards this, since it's safer, even though it may seem redundant.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to advise against upgrading to kubectl 1.5 until you're done acting on petsets. It's safer as a general rule - for example maybe you decide to delete some of your petsets WITH cascading since you don't care if they stay up throughout the upgrade process. If you had already upgraded to kubectl 1.5 it won't work the way you expected.
|
||
#### Upgrade your Kubernetes cluster to >= 1.5 | ||
|
||
Now, you may [upgrade your Kubernetes cluster](/docs/admin/cluster-management/#upgrading-a-cluster), or just your master, to >= 1.5.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does upgrading nodes result in pod evictions? If so, then it's important to upgrade only the master, then create StatefulSets, then upgrade nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. They shouldn't upgrade nodes at this point, otherwise all pods will be gone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
I manually tested that this flow works from v1.4.6 to current master. However, I was only able to test up to upgrading the master. I couldn't upgrade nodes because For the record, my playbook was: # Install v1.4
git fetch --tags upstream
git checkout v1.4.6
build/release.sh
cluster/kube-up.sh
# Do petsets tutorial: http://kubernetes.io/docs/user-guide/petset/
# Prepare statefulset manifest.
# Delete petset with --cascade=false.
# Verify pods are still good.
# Upgrade master to v1.5
make clean
git checkout master
git pull upstream master
build-tools/release.sh
cluster/gce/upgrade.sh -M -l
# Switch kubectl from v1.4 to v1.5.
# Verify pods are still good.
# Create statefulset.
# Delete a pod and verify statefulset recreates it. |
|
||
```shell | ||
# Delete all existing Pet Sets without cascading | ||
kubectl delete petsets -f <pet-set-file> --cascade=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take out the petsets
argument when using -f
. Also it may be worth warning against doing this with the YAML file you originally used to create the Pet Set, because that may contain other things like Services that you don't want to delete at this time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thanks
|
||
### Upgrading from Pet Sets to Stateful Sets | ||
|
||
#### Find all Pet Sets and their manifests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was worried that if the user upgrades to kubectl from v1.4 to v1.5 first, then the following (kubectl get petsets
) would not work. I tested it just now and it does seem to work, but there may be some unexpected results. For example, I did kubectl delete petset <name>
with kubectl v1.5 and it did delete the petset, but it didn't scale it down first. I'm guessing that's because the scale-down is initiated by kubectl on the client side, so if you delete a type that the client doesn't know about, it will be the same as --cascade=false
?
I repeated the test with v1.5.0-beta.2 and tried to continue to upgrade Nodes this time. After the
There should be web-0 through web-4. I checked events on one of the Pods stuck in ContainerCreating and it seems to be a problem with reattaching the PV (see below). Is this a known issue for upgrades? Also, is it expected that StatefulSet will not try to create web-0 until the existing Pods are Ready? I thought that StatefulSet would handle the case where Pod N+1 can't become Ready until Pod N is Ready, but if the behavior I'm seeing here (it's not trying to create web-0) is expected, then such dependencies must be disallowed to prevent deadlock.
|
I'll start a writing review today, and provide feedback tomorrow. |
--- | ||
|
||
{% capture overview %} | ||
This page shows how to upgrade from Pet Sets (Kubernetes cluster at version 1.3-1.4) to Stateful Sets (version >= 1.5). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Janet, We recently put together a style guide, and I realize now that I need to add some content to the style guide about API names. I've done that in PR 1807. The idea is that we want to refer to API objects by using the exact API object name. So for example, we would say PetSet, PetSets, StatefulSet, StatefulSets, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
{% capture prerequisites %} | ||
|
||
* If you don't have Pet Sets in your current cluster, or you don't plan to upgrade your cluster/master to >= 1.5 at this moment, you can skip this task now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: upgrade your master to Kubernetes version 1.5 or later, you can skip this task.
Similar suggestion applies to all instances of >=1.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed all
2. Change `kind` from `PetSet` to `StatefulSet` | ||
3. If you have the debug hook annotation `pod.alpha.kubernetes.io/initialized` set to `true`, you may remove it since it's redundant. If you don't have this annotation, you should add one, with the value set to `false`, to pause Stateful Sets operations. | ||
|
||
It's recommended that you keep both Pet Set manifests and Stateful Set manifests, so that you may safely rollback and recreate your Pet Sets, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rollback -> roll back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Note that if the flag wasn't set, **cascading deletion will be performed by default**, and all pods managed by your Pet Sets will be gone. | ||
|
||
You may delete those Pet Sets by specifying file names. This only works when in | ||
the files there are only Pet Sets, but not other resources (such as Services): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: This only works when the files contain only PetSets, but not other resources such as Services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
1. Change `apiVersion` from `apps/v1alpha1` to `apps/v1beta1` | ||
2. Change `kind` from `PetSet` to `StatefulSet` | ||
3. If you have the debug hook annotation `pod.alpha.kubernetes.io/initialized` set to `true`, you may remove it since it's redundant. If you don't have this annotation, you should add one, with the value set to `false`, to pause Stateful Sets operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: you can remove it because
Generally, we use these conventions:
may: permission
might: possibility
can: able to
because: why
since: from some time in the past
Similar suggestion applies to several spots in the document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed all usage by following the conventions.
Could the conventions be included in the style guide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into adding these to the style guide.
|
||
Now, you may [upgrade your Kubernetes master](/docs/admin/cluster-management/#upgrading-a-cluster) to >= 1.5.0. | ||
Note that Kubernetes nodes should NOT be upgraded at this point, since the pods | ||
(that were once managed be Pet Sets) are now vulnerable to node failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be -> by
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
#### Create Stateful Sets | ||
|
||
Make sure you have both master and `kubectl` upgrade to a version >= 1.5 before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upgrade -> upgraded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
#### Create Stateful Sets | ||
|
||
Make sure you have both master and `kubectl` upgrade to a version >= 1.5 before | ||
continuing. To verify this, run this command to make sure both client and server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making the terminology in this sentence more consistent. On the one hand, we have (master, kubectl), and on the other hand we have (server, client).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because the command output only says "Client Version" and "Server Version". I updated this part to make it more clear.
Thanks @steveperry-53 for the review. All comments addressed. PTAL |
#### Upgrade master to Kubernetes version 1.5 or later | ||
|
||
Now, you can [upgrade your Kubernetes master](/docs/admin/cluster-management/#upgrading-a-cluster) to Kubernetes version 1.5 or later. | ||
Note that Kubernetes nodes should NOT be upgraded at this point, since the Pods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty important, so maybe bold it. Also active voice will help to clarify and emphasize this point:
Note that **you should not upgrade Nodes at this time**, because ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
The output is similar to this: | ||
|
||
```shell | ||
Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2.2+f64c9f2d999ceb-dirty", GitCommit:"f64c9f2d999ceb157d5672e9bba6639a4c456f6e", GitTreeState:"dirty", BuildDate:"2016-11-29T22:49:45Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's one with a cleaner GitVersion and non-dirty tree state:
Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:35:03Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:30:23Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
You could also fake it by changing 5+
to 5
and removing the -beta.2
since these docs are supposed to target the final release. Users may be confused to see the beta stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
#### Upgrade nodes to Kubernetes version 1.5 or later (optional) | ||
|
||
You can now [upgrading Kubernetes nodes](/docs/admin/cluster-management/#upgrading-a-cluster) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/upgrading/upgrade/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
LGTM. Do you plan to fill in the TODOs before merging, or in a later PR? |
I plan to do it later, unless those docs exist in the branch |
|
||
- title: Managing Stateful Applications | ||
section: | ||
- title: Upgrade from Pet Sets to Stateful Sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with other titles, I suggest this title:
Upgrading from PetSets to StatefulSets
If you change the title here, also change it in index.md.
PetSet was introduced as an alpha resource in Kubernetes release 1.3, and was renamed to StatefulSet as a beta resource in 1.5. | ||
Here are some notable changes: | ||
|
||
* **StatefulSet is the new PetSet**: PetSet is no longer available in Kubernetes release 1.5 or later. It becomes beta StatefulSet. To know why the name is changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
"To know why the name is changed" -> "To understand why the name was changed"
|
||
### Upgrading from PetSets to StatefulSets | ||
|
||
Note that these steps need to be operated in the specified order. You **should |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"need to be operated" -> "need to be done"
|
||
#### Prepare StatefulSet manifests | ||
|
||
Now, for every PetSet manifest you have, prepare a corresponding StatefulSet manifest with the following steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Strike "with the following steps."
... prepare a corresponding StatefulSet manifest:
Here are some notable changes: | ||
|
||
* **StatefulSet is the new PetSet**: PetSet is no longer available in Kubernetes release 1.5 or later. It becomes beta StatefulSet. To know why the name is changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430). | ||
* **StatefulSet guards against split brain**: StatefulSets guarantee at most one Pod for a given ordinal index can be running anywhere in a cluster, to guard against split brain scenarios with distributed applications. *TODO: Link to doc about fencing* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the entire doc, put periods at the end of list items.
At this moment, you've deleted all PetSets in your cluster, but not their Pods, Persistent Volumes, or Persistent Volume Claims. | ||
However, since the Pods are not managed by PetSets anymore, they will be vulnerable to node failures until you finish the master upgrade and recreate StatefulSets. | ||
|
||
#### Upgrade master to Kubernetes version 1.5 or later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Upgrade master" -> "Upgrade your master"
I've added a few comments. Other than that, LGTM. |
All comments addressed |
Reviewed 1 of 4 files at r3, 1 of 3 files at r6, 3 of 3 files at r11. Comments from Reviewable |
@janetkuo Are you ready for me to merge this? Or would you like to wait until the 35 unresolved discussions in Reviewable are resolved? |
Review status: all files reviewed at latest revision, 15 unresolved discussions. _data/tasks.yml, line 28 at r10 (raw file): Previously, steveperry-53 (Steve Perry) wrote…
Done. docs/tasks/index.md, line 26 at r1 (raw file): Previously, kow3ns (Kenneth Owens) wrote…
Changed back to PetSet according to new style guide docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set.md, line 37 at r7 (raw file): Previously, enisoc (Anthony Yeh) wrote…
Done. docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set.md, line 31 at r10 (raw file): Previously, steveperry-53 (Steve Perry) wrote…
Done. docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set.md, line 32 at r10 (raw file): Previously, steveperry-53 (Steve Perry) wrote…
Done. docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set.md, line 38 at r10 (raw file): Previously, steveperry-53 (Steve Perry) wrote…
Done. docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set.md, line 65 at r10 (raw file): Previously, steveperry-53 (Steve Perry) wrote…
Done. docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set.md, line 106 at r10 (raw file): Previously, steveperry-53 (Steve Perry) wrote…
Done. docs/tasks/stateful-sets/upgrade-pet-sets-to-stateful-sets.md, line 87 at r4 (raw file): Previously, foxish (Anirudh Ramanathan) wrote…
Done. Comments from Reviewable |
There are still 15 unresolved discussions left, even after I resolved them in Reviewable. All comments are addressed, but the discussions somehow won't go away. :/ @steveperry-53 we can just go ahead merging this. |
Add Rodolfo Martinez to Spanish approver team
cc @bprashanth @erictune @foxish @kow3ns @enisoc @kubernetes/sig-apps
This change is