Giter VIP home page Giter VIP logo

apik3s's Introduction

APIK3S

This is an api developed for communicate with a k3s cluster and automate the deploy of nfs server exposed by the cluster.

Requirement

This api have some requirement:

  • k3s cluster installed without ServiceLB
  • MetalLB installed
  • Longhorn installed
  • Port 8888 must be open and not used

Install

For use apik3s software you can download the apik3s exec from desired release.
You can use this by running it or create a new systemd service for automate api start on system boot for example:

mv apik3s /usr/local/bin/apik3s
vi /etc/systemd/system/apik3s.service

Insert:

[Unit]
Description=apik3s service

[Service]
ExecStart=/usr/local/bin/apik3s

[Install]
WantedBy=multi-user.target

next:

systemctl daemon-reload
systemctl enable --now apik3s.service

Now apik3s start listening on port 8888 automaticaly.

How to use

For use this api a client must send http request to the api server.
In Request sections you can see all supported request.

GET Request

request path request scope
/ return a list of all supported request in a json file
/apik3s/storage/:namespace return a list of active storage for a specific workspace/namespace
/apik3s/storage/ return a list of active workspace/namespace
/apik3s/IPs return a list of active ip address pool

POST Request

there are three post request for this api

request path requested body request scope
/apik3s/storage/root {
"id": "*nfs storage name*",
"size": *size in GB*,
"ip": "*ip address or auto*"
}
used for create a new storage, it create a new pvc a new deploy of the storage with 1 pod replica and if it not exist a new namespace.
/apik3s/IPs {
"id": "*pool name*",
"ips":["*pool1*","*pool2*"]
}
it create a new ip pool, it create a new IP Address pool and a new L2 Advertisement, is possible specify ips with an ip interval or using IP CIDR

DELETE Request

there are three delete request in this api

request path request scope
/apik3s/storage/:namespace it delete a workspace/namespace and all its content
/apik3s/storage/:namespace/:storage it delete a single storage, delete his service, deploy and pvc
/apik3s/IPs/:poolname it delete a ip pool, delete his ip address pool and his L2Advertisement

Used project

This api use different go packager:

Authors

Roadmap

  • Make code more light

apik3s's People

Contributors

rh363 avatar

Watchers

 avatar  avatar

apik3s's Issues

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.