GithubHelp home page GithubHelp logo

miss-bug / kruise Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openkruise/kruise

0.0 1.0 0.0 40.75 MB

Automate application workloads management on Kubernetes

Home Page: https://openkruise.io

License: Other

Dockerfile 0.03% Makefile 0.14% Go 99.10% Shell 0.33% Smarty 0.40%

kruise's Introduction

OpenKruise/Kruise

License Go Report Card CII Best Practices

notification What is NEW!
Mar 20th, 2020. Kruise v0.4.1 is RELEASED! It provides graceful in-place update for Advanced StatefulSet and CloneSet, please check the CHANGELOG for details.
Feb 7th, 2020. Kruise v0.4.0 is RELEASED! It provides a new CloneSet controller, please check the CHANGELOG for details.
Nov 24th, 2019. A blog about new UnitedDeployment controller is posted in Kruise Blog (link).

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 four workload controllers:

  • Advanced StatefulSet: An enhanced version of default StatefulSet with extra functionalities such as inplace-update, pasue and MaxUnavailable.

  • BroadcastJob: A job that runs Pods to completion across all the nodes in the cluster.

  • 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.

  • 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.

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. You can 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 [Recommended]

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.4.1/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.

Install with YAML files [Deprecated]

# Install CRDs
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_broadcastjob.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_sidecarset.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_statefulset.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_uniteddeployment.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_cloneset.yaml

# Install kruise-controller-manager
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml

Note that all_in_one.yaml contains the daily packaged image of Kruise-manager, which might be unstable. So you may install with YAML files in test clusters, but it is not suitable for production.

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:

  1. Only install the CRDs you need.

  2. 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.

Usage

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

Developer Guide

There's a Makefile in the root folder which describes the options to build and install. Here are some common ones:

Build the controller manager binary

make manager

Run the tests

make test

Build the docker image, by default the image name is openkruise/kruise-manager:v1alpha1

export IMG=<your_image_name> && make docker-build

Push the image

export IMG=<your_image_name> && make docker-push or just docker push <your_image_name>

Generate manifests e.g. CRD, RBAC YAML files etc.

make manifests

To develop/debug kruise controller manager locally, please check the debug guide.

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

To uninstall kruise if it is installed with YAML files:

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

Community

If you have any questions or want to contribute, you are welcome to communicate most things via GitHub issues or pull requests.

Other active communication channels:

  • Slack: channel address
  • Mailing List: todo
  • Dingtalk Group(钉钉讨论群)

Copyright

Certain implementation relies on existing code from Kubernetes and the credit goes to original Kubernetes authors.

kruise's People

Contributors

fillzpp avatar jian-he avatar fei-guo avatar wu8685 avatar allencloud avatar hellolijj avatar resouer avatar xiang90 avatar kevinbetterq avatar coldtea214 avatar wonderflow avatar wenfeng-gao avatar bswang avatar jamiebuilds avatar lachie83 avatar technosophos avatar xlgao-zju avatar xuxinkun avatar yuyulei avatar zzxwill avatar furykerry avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.