Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runlevel5/serverless-kubeless-examples
Just an example on how to deploy functions to a K8S cluster running kubeless with Severless Framework CLI
https://github.com/runlevel5/serverless-kubeless-examples
kubeless kubernetes serverless-framework
Last synced: about 8 hours ago
JSON representation
Just an example on how to deploy functions to a K8S cluster running kubeless with Severless Framework CLI
- Host: GitHub
- URL: https://github.com/runlevel5/serverless-kubeless-examples
- Owner: runlevel5
- Created: 2021-07-19T10:47:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-20T13:52:31.000Z (over 3 years ago)
- Last Synced: 2024-11-25T17:12:58.288Z (2 months ago)
- Topics: kubeless, kubernetes, serverless-framework
- Language: JavaScript
- Homepage:
- Size: 131 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An example on kubeless function deployment with serverless framework CLI
## Prerequisites
* Latest LTS NodeJS
* K8S cluster running latest Kubeless
* kubectl## How to?
```console
$ npm install
$ export KUBECONFIG=~/.kube/config
$ aws-vault exec admin@dev-cluster -- kubectl create namespace pr-app
$ aws-vault exec admin@dev-cluster -- npx serverless deploy --namespace pr-app --rootDomain example.com
$ aws-vault exec admin@dev-cluster -- npx serverless invoke --function admin-api--create-user --log --data 'hello world!' --namespace pr-app
Serverless: Calling function: admin-api--create-user...
--------------------------------------------------------------------
Hello world!$ aws-vault exec admin@dev-cluster -- kubeless trigger http create admin-api--create-user --gateway traefik --function-name admin-api--create-user --namespace default --hostname example.com --path create-user
$ aws-vault exec admin@dev-cluster -- kubeless trigger http create admin-api--list-users --gateway traefik --function-name admin-api--list-users --namespace default --hostname example.com --path list-users$ aws-vault exec admin@dev-cluster -- serverless remove --namespace pr-app
$ aws-vault exec admin@dev-cluster -- kubectl remove namespace pr-app
```## TODO
* Why can't function name in camelCase format? (the [doc](https://www.serverless.com/framework/docs/providers/kubeless/guide/intro/) shows that it is possible - could it be out of date?)
* Is there any way to create trigger with serverless.yaml?