This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 752
CLI
sebgoa edited this page Nov 22, 2016
·
2 revisions
We will need a CLI (even though we can skip it and let folks use kubectl
directly).
gcloud alpha functions deploy helloGET --stage-bucket [YOUR_STAGING_BUCKET_NAME] --trigger-http
gcloud alpha functions deploy helloWorld --stage-bucket [BUCKET_NAME] --trigger-topic hello_world
gcloud alpha functions delete helloGET
gcloud alpha functions describe helloWorld
gcloud alpha functions call helloWorld --data '{"message":"Hello World!"}'
gcloud alpha functions logs read helloWorld
gcloud alpha functions list
AWS Lambda examples:
$ aws lambda create-function
--function-name <value>
--runtime <value>
--role <value>
--handler <value>
$ aws lambda invoke \
--invocation-type RequestResponse \
--function-name helloworld \
--region us-west-2 \
--log-type Tail \
--payload '{"key1":"value1", "key2":"value2", "key3":"value3"}' \
--profile adminuser \
outputfile.txt
Webtask examples:
$ wt create foo.js
$ wt create https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/html-response.js --name html-response-url
$ wt logs
$ wt ls
Fission.io examples:
$ fission function create --name hello --env nodejs --code hello.js
$ curl http://$FISSION_ROUTER/hello
Hello, world!
$ kubeless init // creates the third party resource and deploys the controller
$ kubeless ls // list functions
$ kubeless create foobar --runtime python2.7 --handler hello.foobar --from-file hello.py
$ kubeless delete foobar // deletes function <foobar>
$ kubeless logs foobar // streams the logs of function <foobar>, maybe just `kubectl logs` of a Pod running foobar