Install Kubeless binary

While Kubeless comes up, install the Kubeless binary to launch functions in the Kubernetes cluster by running the following command:

export RELEASE=$(curl -s https://api.github.com/repos/kubeless/kubeless/releases/latest | grep tag_name | cut -d '"' -f 4)
export OS=$(uname -s| tr '[:upper:]' '[:lower:]')
curl -OL https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless_$OS-amd64.zip && unzip kubeless_$OS-amd64.zip && mkdir -p ~/local/bin && mv bundles/kubeless_$OS-amd64/kubeless ~/local/bin/ && export PATH=$PATH:~/local/bin

Ensure that the kubeless framework is installed properly by running the following command:

kubeless --help

You should get an output similar to the following:

Serverless framework for Kubernetes

Usage:
kubeless [command]

Available Commands:
autoscale manage autoscale to function on Kubeless
completion Output shell completion code for the specified shell.
function function specific operations
get-server-config Print the current configuration of the controller
help Help about any command
topic manage message topics in Kubeless
trigger trigger specific operations
version Print the version of Kubeless

Flags:
-h, --help help for kubeless

Check the helm deploy status to ensure that everything has been installed:

helm status kubeless

You should get an output that is similar to the following:

LAST DEPLOYED: Sun Mar 10 04:27:03 2019
NAMESPACE: kubeless
STATUS: DEPLOYED

RESOURCES:
==> v1/ConfigMap
NAME DATA AGE
kubeless-config 8 36s

==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
kubeless-kubeless-controller-manager-5cccf45988-nc25l 3/3 Running 0 36s

==> v1/ServiceAccount
NAME SECRETS AGE
controller-acct 1 36s

==> v1beta1/ClusterRole
NAME AGE
kubeless-kubeless-controller-deployer 36s

==> v1beta1/ClusterRoleBinding
NAME AGE
kafka-controller-deployer 36s
kubeless-kubeless-controller-deployer 36s

==> v1beta1/CustomResourceDefinition
NAME AGE
cronjobtriggers.kubeless.io 36s
functions.kubeless.io 36s
httptriggers.kubeless.io 36s

==> v1beta1/Deployment
NAME READY UP-TO-DATE AVAILABLE AGE
kubeless-kubeless-controller-manager 1/1 1 1 36s


NOTES:

== Deploy function

In order to deploy a function you need the kubeless binary.
You can download it from the kubeless repo:

https://github.com/kubeless/kubeless

Great! We are good to go to deploy our first serverless function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset