Kubernetes - Difference Between ReplicaSet and Replication Controller

Last Updated : 17 Oct, 2026

In Kubernetes, ReplicaSet and ReplicationController are resources used to maintain a specified number of running Pods. They monitor Pods and create or remove Pods to maintain the desired replica count. ReplicationController is an older Kubernetes resource, while ReplicaSet is its newer and more flexible replacement.

ReplicationController

  • A ReplicationController is a Kubernetes resource that ensures a specified number of Pod replicas are running at any given time.
  • If a Pod managed by the ReplicationController fails or is deleted, the ReplicationController creates a replacement Pod.

For example, if the desired number of replicas is 3, the ReplicationController continuously tries to maintain 3 matching Pods.

2056958707
Replication Controller Workflow

ReplicationController uses equality-based selectors to identify the Pods it manages.

For example, the selector:

selector:
app: nginx

matches Pods with the following label:

labels:
app: nginx

ReplicaSet

  • A ReplicaSet is a Kubernetes resource that maintains a specified number of identical Pod replicas.
  • It performs the same basic replication and self-healing functions as a ReplicationController but provides more flexible Pod selection.

A ReplicaSet supports the following selector types:

  • matchLabels
  • matchExpressions

For example, a ReplicaSet can use matchLabels:

selector:
matchLabels:
app: nginx

It can also use set-based selectors through matchExpressions:

selector:
matchExpressions:
- key: environment
operator: In
values:
- production
- staging

This allows the ReplicaSet to select Pods based on more complex conditions.

Key Difference

Although both resources maintain the desired number of Pods, they differ in their selector capabilities and usage.

FeatureReplicaSetReplicationController
PurposeMaintains the desired number of PodsMaintains the desired number of Pods
API versionapps/v1v1
Selector typeEquality-based and set-basedEquality-based
matchLabelsSupportedNot supported
matchExpressionsSupportedNot supported
Self-healingYesYes
ScalingYesYes
Rolling updatesNo, not by itselfNo
Used by DeploymentYesNo
Current usagePreferred over ReplicationControllerLegacy
FlexibilityMore flexibleLess flexible
  • For new Kubernetes applications, ReplicaSet is preferred over ReplicationController because it provides more flexible selectors and integrates with Deployments.
  • However, in most application deployments, you should use a Deployment instead of creating a ReplicaSet directly. A Deployment manages ReplicaSets and provides rollout and rollback capabilities.
Comment