Kubernetes API Versioning
medium

Questão de Kubernetes API Versioning #019e3a4f

Enunciado da Questão
Kubernetes API Versioning
#kubernetes
#api-versioning
#alpha
#beta
#stable
Médio

Which of the following options includes valid API versions?

A

alpha1v1, beta3v3, v2

B

alpha1, beta3, v2

C

v1alpha1, v2beta3, v2

Correta
D

v1alpha1, v2beta3, 2.0

Explicação Oficial / Explicações da Comunidade

Kubernetes API versions follow a specific format: v<major><alpha|beta><minor> for alpha and beta versions, and v<major> for stable versions. The correct option is v1alpha1, v2beta3, v2. This includes a valid alpha version (v1alpha1), a valid beta version (v2beta3), and a valid stable version (v2).

How it Works

Kubernetes API versioning uses a three-part scheme:

  • Alpha versions: Format v<major>alpha<minor>, e.g., v1alpha1. These are early, experimental features that may be changed or removed.
  • Beta versions: Format v<major>beta<minor>, e.g., v2beta3. These are more stable but still subject to change.
  • Stable versions: Format v<major>, e.g., v2. These are production-ready and guaranteed to be supported.

Why the Correct Value is Right

v1alpha1 follows the alpha format (v<major>alpha<minor>). v2beta3 follows the beta format (v<major>beta<minor>). v2 is a valid stable version. All three adhere to the official Kubernetes API versioning conventions.

Why the Incorrect Values are Wrong

  • alpha1v1, beta3v3, v2: The first two entries have the version number before the stage, which is incorrect. The correct order is stage before version number (e.g., v1alpha1, not alpha1v1).
  • alpha1, beta3, v2: The first two entries lack the leading v and major version number. Valid versions must start with v followed by a number (e.g., v1alpha1, not alpha1).
  • v1alpha1, v2beta3, 2.0: The last entry 2.0 is not a valid Kubernetes API version. Stable versions are v<major> without a minor version (e.g., v2), and 2.0 is not prefixed with v and includes a decimal point, which is not allowed.