Questão de Kubernetes API Extension #019e3a4f
We can extend the Kubernetes API with Kubernetes API Aggregation Layer and CRDs. What is CRD?
Custom Resource Definition
Custom Restricted Definition
Customized RUST Definition
Custom RUST Definition
Explicação Oficial / Explicações da Comunidade
What is CRD?
CRD stands for Custom Resource Definition. It is a powerful Kubernetes API extension mechanism that allows users to define their own custom resources, extending the Kubernetes API beyond its built-in resources (like Pods, Services, Deployments).
How it Works
A Custom Resource Definition (CRD) is itself a Kubernetes resource (in the apiextensions.k8s.io/v1 API group). When you create a CRD, you define a new custom resource type with a specified name, schema, and scope (namespaced or cluster-scoped). Once the CRD is created, Kubernetes automatically generates a RESTful API endpoint for that custom resource, and you can then create, read, update, and delete instances of that custom resource using kubectl or direct API calls. The CRD does not include any custom logic; it only defines the data structure. To implement business logic, you typically write a custom controller that watches for changes to the custom resource and performs actions accordingly.
Why the Correct Answer is Right
The correct expansion of the acronym CRD is Custom Resource Definition. This is the official term used in the Kubernetes documentation and community. It accurately describes the purpose: defining a custom resource that extends the Kubernetes API.
Why the Incorrect Answers are Wrong
- Custom Restricted Definition: This is not a recognized term in Kubernetes. The word "Restricted" does not appear in the context of CRDs. CRDs are not inherently restricted; they are user-defined and can be as flexible as needed.
- Customized RUST Definition: This is incorrect because CRDs are not specific to the Rust programming language. Kubernetes CRDs are language-agnostic and can be used with any programming language for implementing controllers.
- Custom RUST Definition: Similar to the previous, this incorrectly ties CRDs to Rust. The acronym CRD has no association with Rust.
In summary, CRD is a fundamental concept for extending Kubernetes, enabling users to define their own resource types and build custom controllers to manage them.