You can build elastic serverless applications for Kubernetes easily with Jenkins X. We use an open source project called Knative to provide the elastic scaling of your applications and functions.
Knative Serve exposes functions in any programming language over HTTP with elastic scaling from zero to many pods. This lets you build serverless applications which run on any cloud or kubernetes cluster and make an efficient use of resources.
If your application was imported recently into Jenkins X but before you installed and enabled Knative Serve you can use jx edit deploy to switch between the default deployment kind (using kubernetes Deployment and Service resources) and the knative kind (using Knative Service resource)
jx edit deploy
This command will modify the knativeDeploy flag in your helm charts/myapp/values.yaml file to enable / disable Knative Serve. Once you have committed that code change and merged to master your application will be released to staging using Knative Serve by the automated CI/CD pipeline in Jenkins X.
How it works
The Jenkins X builld packs create a Knative Serve resource in your helm chart at charts/myapp/templates/ksvc.yaml. This resource is only created if the knativeDeploy flag is true / otherwise the default kubernetes Service & Deployment are created.
Edit your team’s deploy kind
You can edit the default deployment kind for your team which is used when’re you create a QuickStart or import a repository via the jx edit deploy command with the -t argument: