Kubernetes
medium

Pregunta de Kubernetes #019e3a4f

Enunciado de la Pregunta
Kubernetes
#kubernetes
#namespaces
#virtual clusters
#multi-tenancy
Medio

Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called:

A

namespaces

Correcto
B

containers

C

hypervisors

D

cgroups

Explicación Oficial / Explicaciones de la Comunidad

In Kubernetes, namespaces provide a mechanism for isolating groups of resources within a single cluster. They enable multiple virtual clusters (namespaces) to coexist on the same physical cluster, each with its own set of resources like pods, services, and deployments. This allows for multi-tenancy and organizational separation without requiring separate physical infrastructure.

How it Works

Namespaces are a fundamental concept in Kubernetes that logically partition the cluster. Resources created in one namespace are isolated from those in another, unless explicitly connected via services or network policies. By default, Kubernetes includes namespaces like default, kube-system, and kube-public. Users can create additional namespaces to separate environments (e.g., dev, staging, prod) or teams.

Why the Correct Answer is Right

  • Namespaces are the correct term for virtual clusters in Kubernetes. They are a built-in abstraction that allows multiple users or teams to share the same cluster while maintaining isolation.

Why the Incorrect Answers are Wrong

  • Containers are lightweight, portable units that package an application and its dependencies. They run inside pods, not as virtual clusters. Containers are the runtime units, not the isolation mechanism for multiple virtual clusters.
  • Hypervisors are software that create and run virtual machines (VMs) by abstracting the underlying hardware. Kubernetes does not use hypervisors for virtual clusters; it uses namespaces for logical separation within a single OS kernel.
  • cgroups (control groups) are a Linux kernel feature that limits, accounts for, and isolates resource usage (CPU, memory, disk I/O) for process groups. While cgroups are used by container runtimes to enforce resource limits, they do not provide the virtual cluster abstraction that namespaces do.