Giter VIP home page Giter VIP logo

kudo's Introduction

KUDO

CircleCI

Kubernetes Universal Declarative Operator (KUDO) provides a declarative approach to building production-grade Kubernetes Operators covering the entire application lifecycle.

Getting Started

See the Documentation with Examples.

Quick Start

Pre-requisites

Before you get started:

Go Modules

⚠️ This project uses Go Modules. Due to the current state of code generation in controller-tools and code-generator, KUDO currently must be cloned into its $GOPATH-based location.

Installation Instructions

  • Get KUDO repo: go get github.com/kudobuilder/kudo/
  • cd $GOPATH/src/github.com/kudobuilder/kudo
  • make install to deploy universal CRDs
  • make run to run the Operator with local go environment

Notes:

  1. If go get ... is not functioning, an alternative is to:
  • cd $GOPATH
  • mkdir -p src/github.com/kudobuilder
  • cd src/github.com/kudobuilder
  • git clone [email protected]:kudobuilder/kudo.git
  1. Before make install you will need to have:
  • minikube running (some of the tests run against it)
  • ~/.git-credentials must exist with git credentials.
  • lint in $PATH which is provided by having $GOPATH\bin in $PATH as in export PATH=$GOPATH/bin:$PATH.

Running the Operator

In order to run KUDO CRDs must be installed. make install-crds will install the CRDs which can be confirmed with kubectl get crds resulting in something looking like:

  $ kubectl get crds
  NAME                            CREATED AT
  frameworks.kudo.k8s.io          2019-04-12T19:50:18Z
  frameworkversions.kudo.k8s.io   2019-04-12T19:50:18Z
  instances.kudo.k8s.io           2019-04-12T19:50:18Z
  planexecutions.kudo.k8s.io      2019-04-12T19:50:18Z

To update code generation and these manifests after an API object change, run make generate and make manifests.

To run operator: make run

Running the CLI

  • To create CLI: make cli
  • ensure $GOPATH/src/github.com/kudobuilder/kudo/bin is in your PATH

To run CLI: kubectl kudo

Useful Tools

Tools are located in tools.go in order to pin their versions. Refer to (https://github.com/go-modules-by-example/index/blob/ac9bf72/010_tools/README.md)[https://github.com/go-modules-by-example/index/blob/ac9bf72/010_tools/README.md] for more information. The Makefile will automatically go install the required tools before they are installed, using the versions specified by the module.

Concepts

  • Framework: High-level description of a deployable application (e.g., Apache Kafka)
  • FrameworkVersion: Specific version of a deployable application, including lifecycle hooks for deployments, upgrades, and rollbacks (e.g., Kafka version 2.4.1)
  • Instance: Resource created to manage an instance of specific FrameworkVersion. Instances are pets and have the same name throughout its entire lifecycle. (e.g., Kafka 2.4.1 cluster with 3 brokers)
  • PlanExecution: Kudo-managed resource defining the inputs and status of an instance’s executable plans (e.g., upgrade kafka from version 2.4.1 -> 2.4.2)

Deploy your first Application

Create a Framework object for Zookeeper

$ kubectl apply -f https://raw.githubusercontent.com/kudobuilder/frameworks/master/repo/stable/zookeeper/versions/0/zookeeper-framework.yaml
framework.kudo.k8s.io/zookeeper created

Create a FrameworkVersion for the Zookeeper Framework

$ kubectl apply -f https://raw.githubusercontent.com/kudobuilder/frameworks/master/repo/stable/zookeeper/versions/0/zookeeper-frameworkversion.yaml
frameworkversion.kudo.k8s.io/zookeeper-1.0 created

Create an Instance of the Zookeeper

$ kubectl apply -f https://raw.githubusercontent.com/kudobuilder/frameworks/master/repo/stable/zookeeper/versions/0/zookeeper-instance.yaml
instance.kudo.k8s.io/zk created

When an instance is created, the default deploy plan is executed.

$ kubectl get planexecutions
NAME                  AGE
zk-deploy-317743000   53s

The statefulset defined in the FrameworkVersion comes up with 3 pods:

kubectl get statefulset zk-zk
NAME    DESIRED   CURRENT   AGE
zk-zk   3         3         1m20s
 kubectl get pods
NAME                    READY   STATUS             RESTARTS   AGE
zk-zk-0                 1/1     Running            0          23s
zk-zk-1                 1/1     Running            0          23s
zk-zk-2                 1/1     Running            0          23s

Community, Discussion, Contribution, and Support

Learn how to engage with the Kubernetes community on the community page.

KUDO Weekly Community Meetings

Weekly meetings occur every Thursday at 3pm UTC

You can discuss the agenda or reach the maintainers of this project at:

Quick links:

Code of Conduct

Participation in the Kudo community is governed by the Kubernetes Code of Conduct.

kudo's People

Contributors

runyontr avatar fabianbaier avatar gerred avatar k8s-ci-robot avatar joerg84 avatar spiffxp avatar kensipe avatar guenter avatar philips avatar wking avatar nikhita avatar mbohlool avatar craigbox avatar shaneutt avatar scottbrenner avatar ryadav88 avatar mbssaiakhil avatar castrojo avatar jessfraz avatar munnerz avatar djannot avatar dankohn avatar cblecker avatar bentheelder avatar alenkacz avatar adamdang avatar

Watchers

James Cloos avatar  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.