Kruise - 在Kubernetes上自动化应用程序工作负载管理

网友投稿 1587 2022-10-24

Kruise - 在Kubernetes上自动化应用程序工作负载管理

Kruise - 在Kubernetes上自动化应用程序工作负载管理

OpenKruise/Kruise

English | 简体中文

Introduction

Kruise is the core of the OpenKruise project. It is a set of controllers which extends and complements Kubernetes core controllers on workload management.

Today, Kruise offers five workload controllers:

CloneSet: CloneSet is a workload that mainly focuses on managing stateless applications. It provides full features for more efficient, deterministic and controlled deployment, such as inplace update, specified pod deletion, configurable priority/scatter update, preUpdate/postUpdate hooks. Advanced StatefulSet: An enhanced version of default StatefulSet with extra functionalities such as inplace-update, pause and MaxUnavailable. SidecarSet: A controller that injects sidecar containers into the Pod spec based on selectors and also is able to upgrade the sidecar containers. UnitedDeployment: This controller manages application pods spread in multiple fault domains by using multiple workloads. BroadcastJob: A job that runs Pods to completion across all the nodes in the cluster.

The project roadmap is actively updated in here. This video demo by Lachlan Evenson is great for new users.

Getting started

Check before installation

Kruise requires APIServer to enable features such as MutatingAdmissionWebhook and ValidatingAdmissionWebhook. If your Kubernetes version is lower than 1.12, you should check your cluster qualification before installing Kruise by running one of the following commands locally. The script assumes a read/write permission to /tmp and the local Kubectl is configured to access the target cluster.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/openkruise/kruise/master/scripts/check_for_installation.sh)"

Install with helm charts

It is recommended that you should install Kruise with helm v3, which is a simple command-line tool and you can get it from here.

helm install kruise https://github.com/openkruise/kruise/releases/download/v0.5.0/kruise-chart.tgz

Note that installing this chart directly means it will use the default template values for kruise-manager. You may have to set your specific configurations when it is deployed into a production cluster or you want to enable specific controllers.

The official kruise-controller-manager image is hosted under docker hub.

Optional: Enable specific controllers

If you only need some of the Kruise controllers and want to disable others, you can use either one of the two options or both:

Only install the CRDs you need. Set env CUSTOM_RESOURCE_ENABLE in kruise-manager container by changing kruise-controller-manager statefulset template. The value is a list of resource names that you want to enable. For example, CUSTOM_RESOURCE_ENABLE=StatefulSet,SidecarSet means only AdvancedStatefulSet and SidecarSet controllers/webhooks are enabled, all other controllers/webhooks are disabled. This option can also be applied by using helm chart:

helm install kruise https://github.com/openkruise/kruise/releases/download/v0.5.0/kruise-chart.tgz --set manager.custom_resource_enable="StatefulSet\,SidecarSet"

Usage

Please see detailed documents which include examples, about Kruise controllers. We also provider tutorials to demonstrate how to use Kruise controllers.

Uninstall

Note that this will lead to all resources created by Kruise, including webhook configurations, services, namespace, CRDs, CR instances and Pods managed by Kruise controller, to be deleted! Please do this ONLY when you fully understand the consequence.

To uninstall kruise if it is installed with helm charts:

helm uninstall kruise

Contributing

You are warmly welcomed to hack on Kruise. We have prepared a detailed guide CONTRIBUTING.md.

Community

Active communication channels:

Slack: channel addressMailing List: todoDingtalk Group(钉钉讨论群)

License

Kruise is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Meteor是构建现代Web应用程序的超简单环境
下一篇:使用Flutter构建的Pokedex应用程序(带有大量动画)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~