ahoj
ahoj

Reputation: 35

Why kubectl removed command "rolling-update"?

When I'm learning kubernetes with book KubernetesInAction Ch.09 and make some pratice.


I use kubectl rolling-update kubia-v1 kubia-v2 --image=luksa/kubia:v2

and he tell me Error: unknown command "rolling-update" for "kubectl"

I find it in github Remove deprecated rolling-update command.

I'm confused why they removed this command?

Hope to get an answer, thank you!

Upvotes: 1

Views: 2524

Answers (2)

rongqing zhu
rongqing zhu

Reputation: 36

The reason is that in production, you cannot guarantee the network is always stable. If the network lost, you'd end up in a immediate state where different version of pods running together.

Another important thing is that kubernetes is designed for you telling kubernetes the final status and it help you do it. It's not just like this way kubectl need to tell each detailed steps for the upgrade.

So that deployment resource is introduced.

Upvotes: 2

Matt
Matt

Reputation: 8152

To summarize:

Rolling-update command is client side. Rollout command is server side and appeared some time after roling-update came out and was meant to solve some problems with rolling-update.

They both basically do the same (just in different way) so one must have been removed, because it doesn't make sense to keep duplicated features


Answering to your question: why was is deleted now and after being depricated for some time?

According to Deprecation Policy:

"CLI elements of user-facing components (e.g. kubectl) must function after their announced deprecation for no less than: GA: 12 months or 2 releases (whichever is longer) [...]".

So it couldn't be removed before 1 year after announced as depricated (in 2018), and is this case it were 2 years (deleted in 2020), so everything seems fine.

Upvotes: 0

Related Questions