Giter Club home page Giter Club logo

kubernetes-operator-api's Introduction

Kubernetes Operator Api

The Kubernetes API is a sample Kubernetes operator API using the Java Kubernetes Client.
The API is designed for master-worker deployment to satisfy the requirements.

Overview

  • The CI/CD tool we used before this API started to not be enough.
    The reasons why it is not enough are:

    • Deployments take too long to create, scale, and terminate.
    • In synchronous requests, some of the scenarios' statuses were pending or failed.
    • The pending scenarios could not be retried.
    • Rollbacks could not be performed automatically.
    • Since there was a strict structure to the deployment process, we could not do the business development at any stage.

    By using this API, above problems have been solved. You can use this API for such requirements.

  • In the resources folder of our application we have:
    master-deployment.yaml, worker-deployment.yaml, master-service.yaml, master-service-ui.yaml
    You must customize these files to suit you. This pattern __ was used in file reading operations. Let's not overlook it.
    Note that you must use all four of these deployment yaml's.

  • The strategy pattern has been used so that the project can work with more than one data center.
    You must define the data center strategy you want to use. After that, it will be enough to send it in the data_center field.

The following are the flows that we have implemented in this project.

Create deployment flow

  - Deploy master
  - Roll out status
  - Deploy worker
  - Roll out status
  - Create service
  - Create service ui 
  - Print pod status 
  - Retrieve service list
  - Print service status

Scale deployment flow

  - Scale deployment
  - Roll out status

Terminate deployment flow

  - Delete master deployment
  - Delete worker deployment
  - Delete master service
  - Delete master ui service

Tech Stack
  • Java 11
  • Spring Boot
  • Kubernetes Client
Requirements

For building and running the application, you need:

Build & Run
  mvn clean install 
  mvn --projects kubernetes-operator-api spring-boot:run
Port
  http://localhost:1234
License

Distributed under the MIT License. See LICENSE for more information.

kubernetes-operator-api's People

Contributors

iremokur avatar mehmetpekdemir avatar muratcorlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mehmetpekdemir

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.