Cluster Store

What Is a Cluster Store?

A cluster store is the persistent data store that maintains the configuration and state of a Kubernetes cluster. Here is where all information related to cluster resources, such as Pods, Deployments, Services, and node states, is kept. Kubernetes uses etcd, a distributed key-value store, as its backing store. This data is updated by the API server whenever there is an interaction between users and control plane components of the Kubernetes cluster.

How Does a Cluster Store Work?

With the help of the API server in Kubernetes, communication happens between the cluster and its backing store, called etcd. All changes made to existing resources first go to the API server for request validation and then follow through accordingly. The store holds information regarding the resources in the key-value format and stores appropriate revisions after the events have occurred. If the API server is given a request for data retrieval, it provides the information regarding the requested resource. Controllers and other components watch the changes in the cluster through the API interface of Kubernetes and apply updates for reacting to changes occurring in the cluster state. In a case one operates on multi-node etcd, etcd applies a consensus algorithm called Raft to the process, which is responsible for coordinating writes replication and committing data to the storage.

Key Characteristics of Cluster Store

  • Persistent state storage: Maintains Kubernetes resource definitions, configuration, and cluster state across control plane operations.
  • Key-value data model: Stores information as key-value records, allowing efficient retrieval and updates.
  • Consistency: Uses Raft consensus to coordinate replicated data and maintain consistency across etcd members.
  • API server integration: The Kubernetes API server accesses the cluster store for resource creation, retrieval, modification, and deletion.
  • High availability: Multiple etcd members maintain replicated data and tolerate individual member failures while a quorum remains available.

Benefits of Cluster Store

  • Reliable state management: Maintains a persistent record of cluster resources and configuration.
  • Consistent cluster operations: Keeps control plane components aligned with the authoritative stored state.
  • Recovery and backup: etcd snapshots support restoration of cluster state after data loss or infrastructure failure.
  • High availability: Replication and consensus maintain data access during certain member failures.

Cluster Store in Cloud Computing

In cloud Kubernetes deployments, a cluster store is utilized as part of control and resource management tasks. In case of a self-managed deployment, it’s the responsibility of system admins to maintain etcd, including its storing, replication, backing up, securing and recovering. In case of managed Kubernetes solutions, like Amazon EKS or Google Kubernetes Engine, the control plane’s supporting infrastructure is managed by the service provider on behalf of the customers. However, the existence of the cluster store is important to the control plane’s performance as it keeps the data which enables the Kubernetes to manage resources.