×
Community Blog OpenKruise v1.6: Enhanced Multi-domain Management Capability

OpenKruise v1.6: Enhanced Multi-domain Management Capability

This article provides an overview of the core features of the OpenKruise v1.6.

By Liheng

Overview

OpenKruise [1] is an open-source cloud-native application automation management suite provided by Alibaba Cloud, and it's also an incubating project hosted by the Cloud Native Computing Foundation (CNCF). Leveraging Alibaba Group's accumulated expertise in containerization and cloud-native technologies, OpenKruise is a standard extension component based on Kubernetes, widely used in Alibaba Group's production environment. It's a technical concept and best practice that closely follows upstream community standards and adapts to large-scale Internet scenarios.

OpenKruise has released its latest version, v1.6 (ChangeLog [2]), in March 2024. This article provides an overview of the core features of the new version.

Upgrade Notice

Starting from v1.6.0, OpenKruise must be installed and used in Kubernetes clusters of Kubernetes >= 1.18 or later. If you have disabled Kruise-Daemon components (featureGates="KruiseDaemon=false"), you can still install it on clusters with Kubernetes 1.16 and 1.17.

OpenKruise Leader election uses the leases mode by default. For users of OpenKruise 1.3.0 or earlier, please upgrade OpenKruise to version 1.4 or 1.5 before upgrading to version 1.6 to avoid unexpected Multiple Leader issues during the upgrade process.

To avoid potential circular dependency issues, webhook-dependent functions will no longer be available for kube-system resources, such as SidecarSet, WorkloadSpread, PodUnavailableBudget, ContainerLaunchPriority, and PersistentPodState.

Enhanced Multi-domain Management Capability

As the digital transformation of enterprises accelerates, more and more key businesses are deployed on Kubernetes clusters hosted on the cloud. The increase of deployed services and types on Kubernetes puts forward diversified demands for the deployment mode in a single Kubernetes cluster, such as:

Scheduled scaling: During periodic peak hours, it scales out the business to the elastic resource pool. After the peak hours, it scales in the elastic resource instances.

Multi-architecture computing power: The cluster contains both x86 and arm computing power.

Multi-data center disaster recovery: Application instances are deployed in multiple A/Z zones for disaster recovery.

WorkloadSpread is a multi-domain management solution proposed by OpenKruise v0.10 to solve the preceding problems. Common Scenarios:

1

Fix: subset replicas ratio will be broken during the rolling upgrade of Deployment/CloneSet

If maxSurge>0 is configured during the rolling update of Deployment/CloneSet, the deployment will be scaled out before it is scaled in. As shown in the following figure, when Pod-10 is created, since the x86 resource pool already has six pods (one v1 and five v2), Pod-10 is allocated to the arm resource pool. After the v1-Pod is deleted, x86 and arm have 50% replicas pods respectively, which destroys the workloadSpread subset replicas ratio configuration.

2

In this version, WorkloadSpread considers the pod version when allocating the subset pod, so this issue has been fixed. Therefore, if you use the workloadSpread feature in a production environment, we recommend that you upgrade it to Kruise v1.6.

Image Pre-download to Support the 'Always' Policy

OpenKruise image pre-download allows you to pre-download Base and business images to Node in advance. This greatly accelerates business scaling out and meets the demand for high-speed elasticity during peak hours.

3

When OpenKruise pre-downloads an image, it first determines whether the image of the Tag exists on the Node. If the image exists, OpenKruise will not pre-download the image. Therefore, if the image Tag remains unchanged but the image content changes, then the images cannot be pre-downloaded, for example, the images of Latest Tag.

This version adds the imagePullPolicy='Always' policy to support the preceding scenarios. In addition, it can be matched with completionPolicy.type=Never to normally pre-download Base images:

  1. Image pre-download will be performed around 00:00 every night;
  2. If there is a Node machine scaling out, it will be pre-downloaded automatically.
apiVersion: apps.kruise.io/v1alpha1
kind: ImagePullJob
metadata:
  name: job-with-base
spec:
  image: base:latest
  imagePullPolicy: Always
  parallelism: 10 
  completionPolicy:
    type: Never
  pullPolicy:                    
    backoffLimit: 3
    timeoutSeconds: 300

Cascading Deletion Protection for Service & Ingress

To improve the stability and security of Kubernetes clusters, OpenKruise provides a safety policy to prevent cascading deletion for some resources, such as CRD, Namespace, and Deployment. In this version, we have added new protection for Service and Ingress resources. The current policy only supports 'Always', which means that all deletion of Service and Ingress resources will be blocked (unless the label[policy.kruise.io/delete-protection] is removed). Configuration details:

apiVersion: v1
kind: Service
metadata:
  labels:
    policy.kruise.io/delete-protection: Always
  name: test-web

Prospects

Currently, we have planned three versions:

Release 1.7: CloneSet/Advanced StatefulSet supports in-place PVC configuration change, kruise api is upgraded to v1beta1, and the Liveness Probe feature is added.

Release 1.8: SidecarSet supports Kubernetes 1.28 Sidecar Containers and Kruise component minimization deployment solutions.

Release 1.9: CloneSet/Advanced StatefulSet supports Resource in-place VPA.

Welcome to participate in the construction and version planning of kruise. In addition, welcome to get involved with OpenKruise by joining us in Github and Slack. Share your voice through the Slack channel [4].

Reference

[1] OpenKruise
https://github.com/openkruise/kruise
[2] ChangeLog
https://github.com/openkruise/kruise/blob/master/CHANGELOG.md
[3] Slack channel
https://kubernetes.slack.com/channels/openkruise

0 1 0
Share on

You may also like

Comments

Related Products