Skip to content

akashjkhamkar/Bee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bee - A k8s native serverless functions framework

Screenshot 2022-11-14 at 2 34 08 AM

Readme

Commands

  1. Creating the function

    (so far python3 and golang functions are supported, feel free to contribute)

    go run main.go create <language> <function-name>

    this will create a folder with the function name in the current directory,

    edit the code in the function file to add your function code

  2. Building the function image

    go run main.go build <path-to-the-function-folder>

    this will create a docker image based on your function

  3. Pushing the function image

    go run main.go push <path-to-the-function-folder> <repo-user/repo-name>

    (setup your repository with docker first before using this command)

  4. Deploying on the kubernetes cluster

    go run main.go deploy <path-to-the-function-folder>

    (again, setup the repository with the kubernetes first)

    this will create a deployment, and a service for the function

Config.yaml

config.yaml contains the metadata for the function

you can change the number of replicas and the auto-scaling parameters here

running the deploy commands will apply these configs

function_name: coffee
runtime: python
repository: xatriya/coffee
replicas: 3
autoscaling: true
min_replicas: 3
max_replicas: 10
cpu_percent: 50
isbuilt: true

Deployment.yaml and Service.yaml

deployment.yaml and service.yaml is generated after the pushing image

you can modify these files, although do not change the labels

About

k8s native serverless functions framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published