Skip to content
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

Please enhance the section description at tutorials/stateful-application/basic-stateful-set/#on-delete #44713

Open
drakee1990 opened this issue Jan 12, 2024 · 8 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. language/en Issues or PRs related to English language triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@drakee1990
Copy link

drakee1990 commented Jan 12, 2024

This is a Feature Request

What would you like to be added
At this section, it introduces using OnDelete by the command below.

kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"OnDelete"}}}'

But in the case of a server like minikube, where defaulting spec.updateStrategy.rollingUpdate field in the create step,
it shows an error like this.

➜  minikube kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"OnDelete"}}}'
The StatefulSet "web" is invalid: spec.updateStrategy.rollingUpdate: Invalid value: apps.RollingUpdateStatefulSetStrategy{Partition:0, MaxUnavailable:(*intstr.IntOrString)(nil)}: only allowed for updateStrategy 'RollingUpdate'

Therefore I recommend to change this part like this.

//As-is
kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"OnDelete"}}}'
//To-be
kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"OnDelete","rollingUpdate":null}}}'

I think it is important because most newbie of k8s will use minikube and they can suffer from similar issues.

Comments

I referred this page for debugging this error.

@drakee1990 drakee1990 added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 12, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 12, 2024
@drakee1990 drakee1990 changed the title Enhance the section description at tutorials/stateful-application/basic-stateful-set/#on-delete Please enhance the section description at tutorials/stateful-application/basic-stateful-set/#on-delete Jan 12, 2024
@AmarNathChary
Copy link
Contributor

/language en

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Jan 12, 2024
@AmarNathChary
Copy link
Contributor

PrashantDesale2004 added a commit to PrashantDesale2004/website that referenced this issue Jan 13, 2024
…rials/stateful-application/basic-stateful-set/#on-delete
@sftim
Copy link
Contributor

sftim commented Jan 14, 2024

Hi @drakee1990

How can we check if the change you're proposing is appropriate?

(I wonder if a different kubectl apply or kubectl patch command could leave the rollingUpdate field unspecified, in all cases).

@Ritikaa96
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 1, 2024
@sftim
Copy link
Contributor

sftim commented Feb 1, 2024

Hi @Ritikaa96

How did you decide that the page needs a fix? I wasn't sure that it does.

@Ritikaa96
Copy link
Contributor

Ritikaa96 commented Feb 1, 2024

Hi @sftim ,
As per #42767 indicating need to revise the page and review discussion on Pr: #44730 (comment) i accepted the Triage

I can definitely be wrong in case there was some pending discussion for acceptance of this issue. My great apologies in that case.

@Ritikaa96
Copy link
Contributor

Also when I use minikube i can replicate this and as per kubernetes/kubernetes#100151 (comment) this behavior is noticed earlier, if this create confusion maybe a small note for this behaviour or the same as author mentioned can clarify this.

@moralok
Copy link

moralok commented Feb 2, 2024

I encountered the same problem when I learned the tutorial using k3s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. language/en Issues or PRs related to English language triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants