Pregunta de Container Orchestration #019e3a4f
Services and Pods in Kubernetes are ______ objects.
JSON
YAML
Java
REST
Explicación Oficial / Explicaciones de la Comunidad
Services and Pods in Kubernetes are REST objects. Kubernetes exposes a RESTful API that allows clients to create, read, update, and delete resources such as Pods and Services. These resources are represented as JSON or YAML manifests, but the objects themselves are RESTful resources managed via HTTP methods (GET, POST, PUT, DELETE) against the API server.
How it Works
Kubernetes uses a declarative model where the desired state of the cluster is defined through REST objects. The API server validates and stores these objects in etcd. Controllers then reconcile the actual state with the desired state. The REST API is the primary interface for interacting with Kubernetes, making Services and Pods REST objects.
Why the Correct Answer is Right
REST (Representational State Transfer) is the architectural style used by Kubernetes API. Every resource, including Services and Pods, is a REST object with a unique URL path (e.g., /api/v1/namespaces/default/pods). This allows tools like kubectl to communicate with the cluster via HTTP requests.
Why the Incorrect Answers are Wrong
- JSON: JSON is a data interchange format used to represent Kubernetes objects in configuration files or API payloads, but it is not the type of object itself. Services and Pods are not JSON objects; they are REST objects that can be serialized as JSON.
- YAML: Similar to JSON, YAML is a human-readable data serialization format often used for Kubernetes manifests. However, the underlying objects are REST resources, not YAML objects.
- Java: Java is a programming language. While Kubernetes can be accessed via Java client libraries, Services and Pods are not Java objects; they are platform-agnostic REST resources.