Example on how to use the Knative provider plugin for the Serverless Framework to deploy Knative workloads on Kubernetes clusters.
- Google Cloud SDK on your local machine
- Node.js >= 8 on your local machine
- Docker in your local machine
- Kubernetes Cluster e.g. on the Google Cloud Platform (or your local machine)
- Knative on your Kubernetes Cluster
Follow this tutorial if you need to install Knative on your Kubernetes cluster.
- Run
serverless install --url https://github.com/pmuens/serverless-knative-example
- Run
cd serverless-knative-example
- Run
npm install
- Create a
docker-creds.json
file in the root of this project and add your Docker Hub credentials (see below for file structure) - Generate a
kubeconfig
file (follow this tutorial if you use the Google Cloud Platform) - Run
serverless deploy
- Run
serverless invoke -f helloWorld
- Run
serverless remove
{
"username": "jdoe",
"password": "S0M3P455W0RD"
}