Cloud Native 10 min read

What’s New in OpenKruise v0.7.0? Advanced StatefulSet, CloneSet, and More

OpenKruise v0.7.0 introduces major enhancements—including Advanced StatefulSet with v1beta1 CRD and ordinal reservation, CloneSet with percentage‑based partitioning, the new AdvancedCronJob controller, and a self‑operating webhook component—providing richer deployment, scaling, and automation capabilities for cloud‑native Kubernetes workloads.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
What’s New in OpenKruise v0.7.0? Advanced StatefulSet, CloneSet, and More

OpenKruise v0.7.0 Overview

OpenKruise is an open‑source large‑scale application automation engine that extends native Kubernetes controllers such as Deployment and StatefulSet. Version v0.7.0 introduces new features: Advanced StatefulSet with a versioned CRD and ordinal reservation, CloneSet with percentage‑based partition, a new AdvancedCronJob controller, and an automated webhook certificate manager.

Advanced StatefulSet

Advanced StatefulSet builds on the native StatefulSet and adds parallel updates, in‑place upgrades, and versioned CRDs. The controller registers a conversion webhook ( kruise-webhook-service) that converts between v1alpha1 and v1beta1 objects. The v1beta1 version is marked storage: true, so it is persisted in etcd. When a client uses the v1beta1 API, the apiserver reads/writes directly to etcd; when the v1alpha1 API is used, the webhook performs read‑side conversion (v1beta1 → v1alpha1) and write‑side conversion (v1alpha1 → v1beta1).

Conversion logic source: https://github.com/openkruise/kruise/blob/master/apis/apps/v1alpha1/statefulset_conversion.go

Ordinal reservation (available from v0.7.0) allows skipping specific pod ordinals. Example:

apiVersion: apps.kruise.io/v1beta1
kind: StatefulSet
spec:
  replicas: 4
  reserveOrdinals:
  - 1

With reserveOrdinals: [1], the controller will not create pod ordinal 1; the running pod ordinals become [0,2,3,4]. Adding more numbers to reserveOrdinals can be used to migrate or delete particular pods while keeping the desired replica count.

CloneSet

CloneSet is a high‑performance controller for stateless workloads, analogous to Deployment but with additional capabilities. The partition field now accepts a percentage value, enabling percentage‑based rollouts.

apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
spec:
  updateStrategy:
    partition: 80%   # only 20% of pods are upgraded

If partition is an integer, the controller upgrades (replicas - partition) pods. If it is a percentage, the controller upgrades (replicas * (100% - partition)) pods.

AdvancedCronJob (new controller)

AdvancedCronJob extends the native CronJob by supporting multiple template types. Users can define a standard jobTemplate (behaves like the original CronJob) or a broadcastJobTemplate that creates a BroadcastJob to run on all or selected nodes.

apiVersion: apps.kruise.io/v1alpha1
kind: AdvancedCronJob
spec:
  template:
    # Option 1: original CronJob behavior
    jobTemplate:
      # ...
    # Option 2: broadcast to nodes
    broadcastJobTemplate:
      # ...

Webhook Self‑Operation Controller

The kruise-controller-manager now includes a webhook controller that automatically generates TLS certificates, stores them in a Secret, and injects the CA bundle into MutatingWebhookConfiguration, ValidatingWebhookConfiguration, and CRD conversion caBundle. The controller watches these resources and refreshes the certificates when they change.

Implementation source: https://github.com/openkruise/kruise/blob/master/pkg/webhook/util/controller/webhook_controller.go

Conclusion

OpenKruise v0.7.0 provides richer workload management: versioned Advanced StatefulSet with ordinal reservation, CloneSet with percentage‑based partitioning, the new AdvancedCronJob controller, and an automated webhook certificate manager.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeKuberneteswebhookOpenKruiseAdvanced StatefulSetCloneSetAdvancedCronJob
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.