What is OpenKruise? Advanced workloads and in-place updates on Kubernetes
Get to know OpenKruise: CloneSet, Advanced StatefulSet, Advanced DaemonSet, SidecarSet, BroadcastJob, ImagePullJob, and PodUnavailableBudget, how in-place updates work, and how it compares to the native Deployment and StatefulSet.
Kubernetes$ kubectl get clonesets -A▍Changing the image of a Deployment with hundreds of replicas means recreating every pod: new scheduling, new IP, volumes mounted again, and sometimes the whole image pulled again. In large clusters, that makes rollouts slow and noisy. OpenKruise was born to solve exactly this kind of pain in managing applications at scale.
What OpenKruise is
OpenKruise is a suite of Kubernetes extensions focused on automating large-scale applications: deployment, upgrades, day-to-day operations, and availability protection. It was created at Alibaba, which runs it in huge production clusters, and is distributed under the Apache 2.0 license.
Almost everything is built with CRDs, so it works on any “plain” Kubernetes cluster with no other dependencies. The documentation itself makes it clear that OpenKruise is not a PaaS: it is a workload layer that platforms can build on.
As of November 2026, OpenKruise is an Incubating CNCF project: it joined as Sandbox in 2020 and moved to Incubating in 2023 (check the project page). At the time of research, the latest release on GitHub was v1.9.3.
What problem it solves
Native workloads cover most cases well, but leave gaps as scale grows:
- Every template change recreates the pod. Even if you only changed the image tag.
- Little control over the rollout.
Deploymenthas nopartitionto stop the update at an exact number of pods. - Sidecars coupled to the app. Updating the logging agent means touching every workload that uses it.
- PDB only protects against eviction. A
kubectl delete podor an update doesn’t go through the PodDisruptionBudget. - Image pulls on the critical path. A node only pulls the image when the pod lands on it.
How it works
OpenKruise has two components, installed in the kruise-system namespace:
| Component | Role |
|---|---|
kruise-manager |
A Deployment with the controllers (CloneSet, SidecarSet…) and the admission webhooks for the CRDs and for pods |
kruise-daemon |
A DaemonSet on every node that pre-pulls images and restarts containers |
In-place updates
This is the core feature. Instead of deleting and recreating the pod, OpenKruise modifies the existing pod, and the kubelet restarts only the affected container. The pod keeps its name, IP, node, and volumes, and the old image’s layers already on the node are reused.
According to the documentation, these can be updated in place: the containers’ image, the pod’s labels and annotations, environment variables sourced from those labels/annotations and, since v1.8, the containers’ resources, if the cluster has InPlacePodVerticalScaling and Kruise’s InPlaceWorkloadVerticalScaling feature gate is on. Any other change, such as editing an env directly, falls back to a recreate update.
The workloads and resources
| Resource | What it’s for |
|---|---|
| CloneSet | A “Deployment on steroids” for stateless apps: in-place, partition, maxSurge, selective pod deletion, and per-pod PVCs |
| Advanced StatefulSet | StatefulSet with in-place, maxUnavailable to update several pods in parallel, and reserved ordinals |
| Advanced DaemonSet | DaemonSet with in-place updates (rollingUpdateType: InPlaceIfPossible), partition, and node selection during rollout |
| SidecarSet | Injects and updates sidecars in every pod matching a selector, without touching the workloads |
| BroadcastJob | A Job that runs one pod on every eligible node, like a DaemonSet that finishes |
| ImagePullJob | Pre-pulls images on a set of nodes before a rollout |
| PodUnavailableBudget | Protects against deletion, eviction, and updates, not only eviction like PDB |
Some features depend on feature gates that are off by default, such as ImagePullJobGate (since v1.5) and PodUnavailableBudgetDeleteGate/PodUnavailableBudgetUpdateGate.
Hands-on example
Installing with Helm, per the official documentation:
helm repo add openkruise https://openkruise.github.io/charts/
helm repo update
helm install kruise openkruise/kruise --version 1.9.3 \
--set featureGates="PodUnavailableBudgetDeleteGate=true\,PodUnavailableBudgetUpdateGate=true"
kubectl get pods -n kruise-system
A CloneSet with in-place updates, a rollout held at 6 of the 10 old pods (partition: 6), and a 10-second grace period for the pod to leave the endpoints before the image swap:
apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
metadata:
name: orders-api
namespace: shop
spec:
replicas: 10
selector:
matchLabels:
app: orders-api
template:
metadata:
labels:
app: orders-api
spec:
containers:
- name: api
image: registry.example.com/your-org/orders-api:1.4.0
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /healthz
port: 8080
updateStrategy:
type: InPlaceIfPossible
partition: 6
maxUnavailable: 2
inPlaceUpdateStrategy:
gracePeriodSeconds: 10
---
apiVersion: policy.kruise.io/v1alpha1
kind: PodUnavailableBudget
metadata:
name: orders-api-pub
namespace: shop
spec:
targetRef:
apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
name: orders-api
maxUnavailable: 20%
When you change the image to 1.5.0, only 4 pods are updated (10 − 6). Looks good? Lower partition to 0 and the rest follow:
kubectl apply -f orders-api.yaml
kubectl get cloneset orders-api -n shop \
-o jsonpath='{.status.updatedReplicas}/{.status.replicas}{"\n"}'
kubectl patch cloneset orders-api -n shop --type merge -p '{"spec":{"updateStrategy":{"partition":0}}}'
A note on API versions: the “next” documentation already shows apps.kruise.io/v1beta1 for CloneSet, but says it only arrives in Kruise v2.0. On 1.x releases, use v1alpha1 (Advanced StatefulSet has used v1beta1 for a long time). The manifests above passed a syntax check but were not applied against the OpenKruise CRDs.
OpenKruise vs. native workloads
| Capability | Deployment | StatefulSet | CloneSet / Advanced StatefulSet |
|---|---|---|---|
| In-place image update | No (recreates the pod) | No (recreates the pod) | Yes |
partition to pause midway |
No | Yes | Yes |
maxSurge |
Yes | No | Yes (CloneSet) |
| Update several pods in parallel | Yes | Depends on version and feature gate | Yes (maxUnavailable) |
| Choose which pods to delete on scale down | Not directly | No (fixed order) | Yes (podsToDelete) |
| Per-pod PVC | No | Yes | Yes |
| Protection beyond eviction | PDB (eviction only) | PDB (eviction only) | PodUnavailableBudget |
For native rollout strategies (rolling update, blue/green, canary, PDB, HPA), see Kubernetes scale and update applications; for PVCs and StatefulSet, see Kubernetes storage.
When to use it (and when not to)
It makes sense when:
- you have many replicas or large images, and recreating pods makes rollouts slow;
- you need staged rollouts with
partitionwithout an extra tool; - you have shared sidecars (logging, proxy, agent) that need centralized updates;
- you want availability protection that covers deletions and updates, not just eviction.
Avoid it when:
- the cluster is small and
Deployments already do the job. It’s more CRDs, webhooks, and a DaemonSet to operate; - your toolchain (dashboards, policies, GitOps with Argo CD) doesn’t understand the new kinds and you don’t want to configure custom health checks;
- what you need is progressive canary delivery. For that there is the sibling project Kruise Rollouts, and, for canary with automated metric analysis, Argo Rollouts.
Alternatives
| Option | When to consider it |
|---|---|
| Native Deployment and StatefulSet | Moderate scale, no need for in-place updates |
| Argo Rollouts | Canary and blue/green with metric analysis on top of Deployments |
| Kruise Rollouts | Progressive rollout from the OpenKruise ecosystem itself |
| Specific operators | Databases and systems with their own operational logic |
Summary
- Measure how much time and impact your current pod-recreating rollout actually causes
- Install OpenKruise with Helm, pinning the chart version
- Use
apps.kruise.io/v1alpha1for CloneSet on 1.x releases - Start with
InPlaceIfPossibleandpartitionon a non-critical service - Turn on the PodUnavailableBudget feature gates before relying on it
- Teach your GitOps and observability tools to read the new kinds
- Evaluate Kruise Rollouts or Argo Rollouts if your goal is progressive canary delivery
OpenKruise doesn’t change what Kubernetes is: it just stops recreating the whole pod when you changed one line.