This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
forked from serverless/serverless
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Kubeless provider documentation
- Loading branch information
Showing
24 changed files
with
1,474 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<!-- | ||
title: Serverless - Kubeless Documentation | ||
menuText: Kubeless | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Kubeless Provider Documentation | ||
|
||
Welcome to the Serverless Kubeless documentation! | ||
|
||
If you have questions, join the [chat in gitter](https://gitter.im/serverless/serverless) or [post over on the forums](https://gitter.im/serverless/serverless) | ||
|
||
<div class="docsSections"> | ||
<div class="docsSection"> | ||
<div class="docsSectionHeader"> | ||
<a href="./guide/"> | ||
<img src="https://s3-us-west-2.amazonaws.com/assets.site.serverless.com/docs/kubeless_guide.jpg" alt="Serverless Framework Kubeless Guide" width="250" draggable="false"/> | ||
</a> | ||
</div> | ||
<div class="test"> | ||
<ul> | ||
<li><a href="./guide/intro.md">Intro</a></li> | ||
<li><a href="./guide/quick-start.md">Quickstart</a></li> | ||
<li><a href="./guide/installation.md">Installation</a></li> | ||
<li><a href="./guide/services.md">Services</a></li> | ||
<li><a href="./guide/functions.md">Functions</a></li> | ||
<li><a href="./guide/events.md">Events</a></li> | ||
<li><a href="./guide/deploying.md">Deploying</a></li> | ||
<li><a href="./guide/debugging.md">Debugging</a></li> | ||
<li><a href="./guide/workflow.md">Workflow</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="docsSection"> | ||
<div class="docsSectionHeader"> | ||
<a href="./cli-reference/"> | ||
<img src="https://s3-us-west-2.amazonaws.com/assets.site.serverless.com/docs/kubeless_cli_ref.jpg" alt="Serverless Framework Kubeless CLI Reference" width="250" draggable="false"/> | ||
</a> | ||
</div> | ||
<div> | ||
<ul> | ||
<li><a href="./cli-reference/create.md">Create</a></li> | ||
<li><a href="./cli-reference/deploy.md">Deploy</a></li> | ||
<li><a href="./cli-reference/invoke.md">Invoke</a></li> | ||
<li><a href="./cli-reference/logs.md">Logs</a></li> | ||
<li><a href="./cli-reference/info.md">Info</a></li> | ||
<li><a href="./cli-reference/remove.md">Remove</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="docsSection"> | ||
<div class="docsSectionHeader"> | ||
<a href="./events/"> | ||
<img src="https://s3-us-west-2.amazonaws.com/assets.site.serverless.com/docs/kubeless_events.jpg" alt="Serverless Framework Kubeless Events Reference" width="250" draggable="false"/> | ||
</a> | ||
</div> | ||
<div> | ||
<ul> | ||
<li><a href="./events/http.md">HTTP Events</a></li> | ||
<li><a href="./events/pubsub.md">PubSub Events</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- | ||
title: Serverless - Kubeless - CLI Reference | ||
menuText: CLI Reference | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/kubeless/cli-reference/) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Serverless Kubeless CLI Reference | ||
|
||
Welcome to the Serverless Kubeless CLI Reference! Please select a section on the left to get started. | ||
|
||
If you have questions, join the [chat in gitter](https://gitter.im/serverless/serverless) or [post over on the forums](http://forum.serverless.com/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!-- | ||
title: Serverless Framework Commands - Kubeless - Create | ||
menuText: create | ||
menuOrder: 1 | ||
description: Creates a new Service in your current working directory | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/kubeless/cli-reference/create) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Kubeless - Create | ||
|
||
Creates a new Serverless service in the current working directory based on the provided template. | ||
|
||
**Create service in current working directory:** | ||
|
||
```bash | ||
serverless create --template kubeless-python | ||
``` | ||
|
||
```bash | ||
serverless create --template kubeless-nodejs | ||
``` | ||
|
||
**Create service in new folder:** | ||
|
||
```bash | ||
serverless create --template kubeless-python --path my-service | ||
``` | ||
|
||
```bash | ||
serverless create --template kubeless-nodejs --path my-service | ||
``` | ||
|
||
## Options | ||
- `--template` or `-t` The name of one of the available templates. **Required**. | ||
- `--path` or `-p` The path where the service should be created. | ||
- `--name` or `-n` the name of the service in `serverless.yml`. | ||
|
||
## Provided lifecycle events | ||
- `create:create` | ||
|
||
## Available Templates for Kubeless | ||
|
||
To see a list of available templates run `serverless create --help` | ||
|
||
These are the current available templates for Kubeless: | ||
|
||
- kubeless-nodejs | ||
- kubeless-python | ||
|
||
## Examples | ||
|
||
### Creating a new Serverless service | ||
|
||
```bash | ||
serverless create --template kubeless-python --name my-special-service | ||
``` | ||
|
||
This example will generate scaffolding for a service with `kubeless` as a provider and `python2.7` as runtime. The scaffolding will be generated in the current working directory. | ||
|
||
The provider which is used for deployment later on is Kubeless. | ||
|
||
### Creating a named service in a (new) directory | ||
|
||
```bash | ||
serverless create --template kubeless-python --path my-new-service | ||
``` | ||
|
||
This example will generate scaffolding for a service with `kubeless` as a provider and `python2.7` as runtime. The scaffolding will be generated in the `my-new-service` directory. This directory will be created if not present. Otherwise Serverless will use the already present directory. | ||
|
||
Additionally Serverless will rename the service according to the path you provide. In this example the service will be renamed to `my-new-service`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
title: Serverless Framework Commands - Kubeless - Deploy | ||
menuText: deploy | ||
menuOrder: 2 | ||
description: Deploy your service to the specified provider | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/kubeless/cli-reference/deploy) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Kubeless - Deploy | ||
|
||
The `sls deploy` command deploys your entire service via the Kubeless API. Run this command when you have made service changes (i.e., you edited `serverless.yml`). | ||
|
||
Use `serverless deploy function -f my-function` when you have made code changes and you want to quickly upload your updated code to your Kubernetes cluster or when you want to deploy just a function of your Serverless service. | ||
|
||
```bash | ||
serverless deploy | ||
``` | ||
|
||
This is the simplest deployment usage possible. With this command Serverless will deploy your service to the default Kubernetes cluster in your kubeconfig file. | ||
|
||
## Options | ||
- `--noDeploy` or `-n` Skips the deployment steps and leaves artifacts in the `.serverless` directory | ||
- `--verbose` or `-v` Shows all stack events during deployment, and display any Stack Output. | ||
- `--function` or `-f` The name of the function which should be deployed | ||
|
||
## Artifacts | ||
|
||
After the `serverless deploy` command runs all created deployment artifacts are placed in the `.serverless` folder of the service. | ||
|
||
## Provided lifecycle events | ||
- `deploy:cleanup` | ||
- `deploy:initialize` | ||
- `deploy:setupProviderConfiguration` | ||
- `deploy:createDeploymentArtifacts` | ||
- `deploy:compileFunctions` | ||
- `deploy:compileEvents` | ||
- `deploy:deploy` | ||
- `deploy:function:deploy` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!-- | ||
title: Serverless Framework Commands - Kubeless - Info | ||
menuText: info | ||
menuOrder: 5 | ||
description: Display information about your deployed service and the Kubeless Functions it contains. | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/kubeless/cli-reference/info) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Kubeless - Info | ||
|
||
Displays information about the deployed service. | ||
|
||
```bash | ||
serverless info | ||
``` | ||
|
||
## Options | ||
- `--verbose` or `-v` Shows the metadata of the Kubernetes objects. | ||
|
||
## Provided lifecycle events | ||
- `info:info` | ||
|
||
## Examples | ||
|
||
On Kubeless the info plugin uses the Kubernetes API to gather the necessary | ||
information about deployed functions and Kubernetes services. See the example | ||
below for an example output. | ||
|
||
**Example:** | ||
|
||
```bash | ||
$ serverless info -v | ||
|
||
Service Information "hello" | ||
Cluster IP: 10.0.0.203 | ||
Type: ClusterIP | ||
Ports: | ||
Protocol: TCP | ||
Port: 8080 | ||
Target Port: 8080 | ||
Metadata | ||
Self Link: /api/v1/namespaces/default/services/hello | ||
UID: 7c2494ea-8976-11e7-b8c4-0800275c88b3 | ||
Timestamp: 2017-08-25T09:19:24Z | ||
Function Info | ||
Handler: handler.hello | ||
Runtime: python2.7 | ||
Trigger: HTTP | ||
Dependencies: | ||
Metadata: | ||
Self Link: /apis/k8s.io/v1/namespaces/default/functions/hello | ||
UID: 7c214cab-8976-11e7-b8c4-0800275c88b3 | ||
Timestamp: 2017-08-25T09:19:23Z | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!-- | ||
title: Serverless Framework Commands - Kubeless - Invoke | ||
menuText: invoke | ||
menuOrder: 3 | ||
description: Invoke an Kubeless Function using the Serverless Framework | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/kubeless/cli-reference/invoke) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Kubeless - Invoke | ||
|
||
Invokes deployed function. It allows to send event data to the function, read logs and display other important information of the function invocation. | ||
|
||
```bash | ||
serverless invoke --function functionName | ||
``` | ||
|
||
## Options | ||
- `--function` or `-f` The name of the function in your service that you want to invoke. **Required**. | ||
- `--data` or `-d` String data to be passed as an event to your function. By default data is read from standard input. | ||
- `--path` or `-p` The path to a json file with input data to be passed to the invoked function. This path is relative to the root directory of the service. | ||
- `--log` or `-l` If set to `true`, it will output logging data of the invocation. Default is `false`. | ||
|
||
## Provided lifecycle events | ||
- `invoke:invoke` | ||
|
||
## Examples | ||
|
||
### Kubeless | ||
|
||
```bash | ||
serverless invoke --function functionName | ||
``` | ||
|
||
This example will invoke your deployed function on the configured platform | ||
endpoint. This will output the result of the invocation in your terminal. | ||
|
||
#### Function invocation with data | ||
|
||
```bash | ||
serverless invoke --function functionName --data '{"name": "Bernie"}' | ||
``` | ||
|
||
#### Function invocation with data from standard input | ||
|
||
```bash | ||
node dataGenerator.js | serverless invoke --function functionName | ||
``` | ||
|
||
#### Function invocation with logging | ||
|
||
```bash | ||
serverless invoke --function functionName --log | ||
``` | ||
|
||
Just like the first example, but will also outputs logging information about your invocation. | ||
|
||
#### Function invocation with data passing | ||
|
||
```bash | ||
serverless invoke --function functionName --path lib/data.json | ||
``` | ||
|
||
This example will pass the json data in the `lib/data.json` file (relative to the root of the service) while invoking | ||
the specified/deployed function. |
Oops, something went wrong.