Deploying the function

As the required files were created through a template, we can modify them as per our needs and then simply deploy and invoke them when we need them. Let's go ahead and deploy them using serverless, then npm install will get the required dependencies for serverless, such as the kubeless-serverless plugin, and then we can deploy the function, as shown in the following code: 

$ npm install$ serverless deploy -vServerless: Packaging service...Serverless: Excluding development dependencies...Serverless: Deploying function bikesearch...Serverless: Pods status: {"waiting":{"reason":"PodInitializing"}}Serverless: Function bikesearch successfully deployedServerless: Skipping ingress rule generation

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.