Skip to content

Commit ac70c45

Browse files
authored
Merge pull request #21274 from sftim/20200520_blog_article_avoid_permabeta
Add blog article for Require Transition from Beta
2 parents 6005510 + 182e259 commit ac70c45

File tree

2 files changed

+158
-0
lines changed

2 files changed

+158
-0
lines changed
Lines changed: 47 additions & 0 deletions
Loading
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
layout: blog
3+
title: "Moving Forward From Beta"
4+
date: 2020-08-21
5+
slug: moving-forward-from-beta
6+
---
7+
8+
**Author**: Tim Bannister, The Scale Factory
9+
10+
In Kubernetes, features follow a defined
11+
[lifecycle](/docs/reference/command-line-tools-reference/feature-gates/#feature-stages).
12+
First, as the twinkle of an eye in an interested developer. Maybe, then,
13+
sketched in online discussions, drawn on the online equivalent of a cafe
14+
napkin. This rough work typically becomes a
15+
[Kubernetes Enhancement Proposal](https://github.com/kubernetes/enhancements/blob/master/keps/0001-kubernetes-enhancement-proposal-process.md#kubernetes-enhancement-proposal-process) (KEP), and
16+
from there it usually turns into code.
17+
18+
For Kubernetes v1.20 and onwards, we're focusing on helping that code
19+
graduate into stable features.
20+
21+
That lifecycle I mentioned runs as follows:
22+
23+
![Alpha → Beta → General Availability](feature_stages.svg)
24+
25+
Usually, alpha features aren't enabled by default. You turn them on by setting a feature
26+
gate; usually, by setting a command line flag on each of the components that use the
27+
feature.
28+
29+
(If you use Kubernetes through a managed service offering such as AKS, EKS, GKE, etc then
30+
the vendor who runs that service may have decided what feature gates are enabled for you).
31+
32+
There's a defined process for graduating an existing, alpha feature into the beta phase.
33+
This is important because **beta features are enabled by default**, with the feature flag still
34+
there so cluster operators can opt out if they want.
35+
36+
A similar but more thorough set of graduation criteria govern the transition to general
37+
availability (GA), also known as "stable". GA features are part of Kubernetes, with a
38+
commitment that they are staying in place throughout the current major version.
39+
40+
Having beta features on by default lets Kubernetes and its contributors get valuable
41+
real-world feedback. However, there's a mismatch of incentives. Once a feature is enabled
42+
by default, people will use it. Even if there might be a few details to shake out,
43+
the way Kubernetes' REST APIs and conventions work mean that any future stable API is going
44+
to be compatible with the most recent beta API: your API objects won't stop working when
45+
a beta feature graduates to GA.
46+
47+
For the API and its resources in particular, there's a much less strong incentive to move
48+
features from beta to GA than from alpha to beta. Vendors who want a particular feature
49+
have had good reason to help get code to the point where features are enabled by default,
50+
and beyond that the journey has been less clear.
51+
52+
KEPs track more than code improvements. Essentially, anything that would need
53+
communicating to the wider community merits a KEP. That said, most KEPs cover
54+
Kubernetes features (and the code to implement them).
55+
56+
You might know that [Ingress](/docs/concepts/services-networking/ingress/)
57+
has been in Kubernetes for a while, but did you realize that it actually went beta in 2015? To help
58+
drive things forward, Kubernetes' Architecture Special Interest Group (SIG) have a new approach in
59+
mind.
60+
61+
## Avoiding permanent beta
62+
63+
For Kubernetes REST APIs, when a new feature's API reaches beta, that starts a countdown.
64+
The beta-quality API now has **nine calendar months** to either:
65+
- reach GA, and deprecate the beta, or
66+
- have a new beta version (_and deprecate the previous beta_).
67+
68+
To be clear, at this point **only REST APIs are affected**. For example, _APIListChunking_ is
69+
a beta feature but isn't itself a REST API. Right now there are no plans to automatically
70+
deprecate _APIListChunking_ nor any other features that aren't REST APIs.
71+
72+
If a REST API reaches the end of that 9 month countdown, then the next Kubernetes release
73+
will deprecate that API version. There's no option for the REST API to stay at the same
74+
beta version beyond the first Kubernetes release to come out after the 9 month window.
75+
76+
### What this means for you
77+
78+
If you're using Kubernetes, there's a good chance that you're using a beta feature. Like
79+
I said, there are lots of them about.
80+
As well as Ingress, you might be using [CronJob](/docs/concepts/workloads/controllers/cron-jobs/),
81+
or [PodSecurityPolicy](/docs/concepts/policy/pod-security-policy/), or others.
82+
There's an even bigger chance that you're running on a control plane with at least one beta
83+
feature enabled.
84+
85+
If you're using or generating Kubernetes manifests that use beta APIs like Ingress, you'll
86+
need to plan to revise those. The current APIs are going to be deprecated following a
87+
schedule (the 9 months I mentioned earlier) and after a further 9 months those deprecated
88+
APIs will be removed. At that point, to stay current with Kubernetes, you should already
89+
have migrated.
90+
91+
### What this means for Kubernetes contributors
92+
93+
The motivation here seems pretty clear: get features stable. Guaranteeing that beta
94+
features will be deprecated adds a pretty big incentive so that people who want the
95+
feature continue their effort until the code, documentation and tests are ready for this
96+
feature to graduate to stable, backed by several Kubernetes' releases of evidence in
97+
real-world use.
98+
99+
### What this means for the ecosystem
100+
101+
In my opinion, these harsh-seeming measures make a lot of sense, and are going to be
102+
good for Kubernetes. Deprecating existing APIs, through a rule that applies across all
103+
the different Special Interest Groups (SIGs), helps avoid stagnation and encourages
104+
fixes.
105+
106+
Let's say that an API goes to beta and then real-world experience shows that it
107+
just isn't right - that, fundamentally, the API has shortcomings. With that 9 month
108+
countdown ticking, the people involved have the means and the justification to revise
109+
and release an API that deals with the problem cases. Anyone who wants to live with
110+
the deprecated API is welcome to - Kubernetes is open source - but their needs do not
111+
have to hold up progress on the feature.

0 commit comments

Comments
 (0)