Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Fixed Kubeless documentation based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
arapulido committed Aug 29, 2017
1 parent 42939fb commit d85bd06
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 75 deletions.
7 changes: 4 additions & 3 deletions docs/providers/kubeless/cli-reference/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ layout: Doc

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.
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.

```bash
serverless deploy
Expand All @@ -23,9 +23,10 @@ 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
- `--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
- `--function` or `-f` The name of the function which should be updated.
- `--package` or `-p` The path of a previously packaged deployment to get deployed (skips packaging step).

## Artifacts

Expand Down
2 changes: 1 addition & 1 deletion docs/providers/kubeless/cli-reference/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ serverless logs -f hello

- `--filter` You can specify a filter string to filter the log output. This is useful if you want to to get the `error` logs for example.
- `--tail` or `-t` You can optionally tail the logs and keep listening for new logs in your terminal session by passing this option.
- `--interval` or `-i` If you choose to tail the output, you can control the interval at which the framework polls the logs with this option. The default is `1000`ms.
- `--count` or `-n` You can print the last N lines of the log.

## Examples

Expand Down
16 changes: 3 additions & 13 deletions docs/providers/kubeless/guide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,10 @@ Serverless: Calling function: bikesearch...
Serverless Version: 1.20.2
```
Serverless returned an error message with a 500 server code, which is what you would expect from a web framework. However, it would be useful to see Python stack trace to better debug the source of the error. To achieve this, first find the container where the function is running using *kubectl*:
Serverless returned an error message with a 500 server code, which is what you would expect from a web framework. However, it would be useful to see Python stack trace to better debug the source of the error. This can be done using the `logs` feature in `serverless`:

```
kubectl get pods

# Output
NAME READY STATUS RESTARTS AGE
bikesearch-3894699941-mbt2t 1/1 Running 1 2d
```

Once the name of the container is known, use *kubectl logs* to check the logs:

```
kubectl logs bikesearch-3894699941-mbt2t
serverless logs -f bikesearch

# Output
Bottle v0.12.13 server starting up (using CherryPyServer())...
Expand Down Expand Up @@ -161,4 +151,4 @@ KeyError: 'term'
It should be clear from the second-to-last line that the error originates in an incorrect key name.
This is a very basic example of debugging a Kubeless function, but it should hopefully highlight the basic principles. Obviously, in production environments, you would want to have more formal and sophisticated error handling built into your code.
This is a very basic example of debugging a Kubeless function, but it should hopefully highlight the basic principles. Obviously, in production environments, you would want to have more formal and sophisticated error handling built into your code.
59 changes: 1 addition & 58 deletions docs/providers/kubeless/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,7 @@ layout: Doc

Kubeless runs on [Kubernetes](https://kubernetes.io), you need a working Kubernetes cluster to run kubeless. For testing you can use [minikube](https://github.com/kubernetes/minikube).

You should deploy Kubeless in your cluster using one of YAML manifests found in the release package. It will create a *kubeless* Namespace and a *function* ThirdPartyResource. You will see a *kubeless* Controller, and *kafka*, *zookeeper* StatefulSet running.

There are several kubeless manifests being shipped for multiple k8s environments (non-rbac and rbac), please consider to pick up the correct one:

* *kubeless-$RELEASE.yaml* is used for non-RBAC Kubernetes cluster.
* *kubeless-rbac-$RELEASE.yaml* is used for RBAC-enabled Kubernetes cluster.

For example, this below is a show case of deploying kubeless to a non-RBAC Kubernetes cluster.

$ export RELEASE=0.0.20
$ kubectl create ns kubeless
$ kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless-$RELEASE.yaml

$ kubectl get pods -n kubeless
NAME READY STATUS RESTARTS AGE
kafka-0 1/1 Running 0 1m
kubeless-controller-3331951411-d60km 1/1 Running 0 1m
zoo-0 1/1 Running 0 1m

$ kubectl get deployment -n kubeless
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
kubeless-controller 1 1 1 1 1m

$ kubectl get statefulset -n kubeless
NAME DESIRED CURRENT AGE
kafka 1 1 1m
zoo 1 1 1m

$ kubectl get thirdpartyresource
NAME DESCRIPTION VERSION(S)
function.k8s.io Kubeless: Serverless framework for Kubernetes v1

$ kubectl get functions

## Installing the Kubeless CLI (optional)

You can optionally install the Kubeless CLI tool.

On Linux, use these commands to install Kubeless CLI in your system:

$ curl -L https://github.com/kubeless/kubeless/releases/download/0.0.20/kubeless_linux-amd64.zip > kubeless.zip
$ unzip kubeless.zip
$ sudo cp bundles/kubeless_linux-amd64/kubeless /usr/local/bin/

On Mac OS X, use these commands to install Kubeless CLI in your system:

$ curl -L https://github.com/kubeless/kubeless/releases/download/0.0.20/kubeless_darwin-amd64.zip > kubeless.zip
$ unzip kubeless.zip
$ sudo cp bundles/kubeless_darwin-amd64/kubeless /usr/local/bin/

| TIP: For detailed installation instructions, visit the [Kubeless releases page](https://github.com/bitnami/kubeless/releases).
Once you have a working Kubernetes cluster, you need to install the Kubeless Controller in it. To do this, follow the [installation instructions in the Kubeless README.md file](https://github.com/kubeless/kubeless#installation).

## Installing Node.js

Expand Down Expand Up @@ -100,10 +50,3 @@ To see which version of serverless you have installed run:
serverless --version
```

## Installing Kubeless Provider Plugin

Now we need to install the provider plugin to allow the framework to deploy services to the platform. This plugin is also [published](http://npmjs.com/package/serverless-kubeless) on [npm](https://npmjs.org) and can installed using the same `npm install` command.

```
npm install -g serverless-kubeless
```

0 comments on commit d85bd06

Please sign in to comment.