-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
document pvc finalizer issue during 1.10 -> 1.9 downgrade #7731
Closed
Closed
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e16c2d1
document pvc finalizer issue during 1.10 -> 1.9 downgrade
rootfs c94778b
feedback addressed
rootfs a1edd39
change the flow: allow downgrade first but deal with finalizer after …
rootfs 47f3147
be more specific about finalizer element to remove
rootfs df9d49f
Update pvc-finalizer-downgrade-issue.md
Bradamant3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
* TOC | ||
{:toc} | ||
|
||
--- | ||
title: Downgrading issue from Kubernetes 1.10 to 1.9 due to StorageObjectInUseProtection | ||
--- | ||
|
||
## Storage Object in Use Protection in Kubernetes 1.10 | ||
|
||
When enabled, [Storage Object in Use Protection](/docs/admin/admission-controllers.md#storage-object-in-use-protection-beta) prevents PV/PVC from being removed when the finalizers are still present. | ||
|
||
## Downgrading issue | ||
|
||
After downgrading from Kubernetes 1.10 to 1.9, PV/PVCs that contain finalizers cannot be removed until their finalizers are removed. | ||
|
||
## Workaround | ||
|
||
Currently the pv-protection and pvc-protection finalizers must be removed manually before you downgrade so that PVs and PVCs can be removed after you downgrade to version 1.9. Here's what to do: | ||
|
||
|
||
Before downgrading to Kubernetes 1.9, disable `StorageObjectInUseProtection` plugin by using apiserver command line option `--disable-admission-plugins=StorageObjectInUseProtection` and restart apiserver: | ||
|
||
- if apiserver is managed by systemd, stop it using `systemd stop <apiserver service name>`. Modify apiserver service unit service file, reload the service, and start it using `systemd start` command | ||
- if apiserver is started through command line, kill the process and run the command again with the above command line option | ||
|
||
|
||
Then patch PV/PVC (e.g. `pv1`) using the following command: | ||
|
||
- Patch the PV or PVC, as in the following command, where `pv1` is the name of the PV to patch: | ||
|
||
```bash | ||
kubectl patch pv pv1 --type=json -p='[{"op": "remove", "path": "/metadata/finalizers"}]' | ||
```` | ||
|
||
- Verify the finalizers are removed: | ||
|
||
```bash | ||
kubectl get pv pv1 -o yaml |grep finalizer | ||
``` | ||
|
||
The result should be empty. | ||
|
||
- You can now safely downgrade to version 1.9. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
do not instruct them to remove the entire finalizers block, just the specific pv or pvc finalizer