Instantly create and update Knative services on top of your Kubernetes cluster with Serverless Components.
$ npm install -g serverless
Just create a serverless.yml
file
$ touch serverless.yml
Then create a .env
file
$ touch .env
Update the .env
file with information about your Kubernetes setup
# .env
KUBERNETES_ENDPOINT=https://cluster.example.com
KUBERNETES_PORT=6443
KUBERNETES_SERVICE_ACCOUNT_TOKEN=xxxx
KUBERNETES_SKIP_TLS_VERIFY=false
# serverless.yml
org: acme
app: todo
name: todo-knative-serving
component: knative-serving@dev
inputs:
knativeGroup: serving.knative.dev # default is `serving.knative.dev`
knativeVersion: v1alpha1 # default is `v1alpha1`
registryAddress: 'https://container-registry.acme.com' # default is `'https://index.docker.io/v1'`
namespace: 'default' # default is `'default'`
name: my-knative-service
repository: acme/some-func
tag: latest
$ serverless
Checkout the Serverless Components repo for more information.