GithubHelp home page GithubHelp logo

k8s-sync's Introduction

k8s-sync

将api server的pod 数据同步到 mysql

原因:用户发布项目实例后,想查询一下实例的信息(比如ip等),通常需要与 静态的项目信息 进行关联查询、模糊查询等。这时,实例信息在apiserver 上, 项目信息在mysql 上,处理起来就不太方便。

mysql 数据库表结构

k8s.tb_pod

1. id
2. env
3. app_name         // 建有索引
4. isolation
5. name             // 建有索引
6. container_id
7. node
8. ip
9. status
10. create_at
11. update_at

功能

  1. 从配置文件中读取 apiserver token
  2. 从命令行读取日志级别,日志打到当前文件夹下
  3. 监听apiserver 保证数据同步的实时性
  4. 定时根据mysql 中的数据反查 apiserver,清理掉漏网之鱼

k8s-sync's People

Watchers

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