mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
2.1 KiB
2.1 KiB
Read this on the main serverless docs site
Kubeless - Workflow
Intro. Quick recommendations and tips for various processes.
Development Workflow
- Write your functions
- Use
serverless deployonly when you've made changes toserverless.ymland in CI/CD systems. - Use
serverless deploy function -f myFunctionto rapidly deploy changes when you are working on a specific Kubeless Function. - Use
serverless invoke -f myFunction -lto test your Kubeless Functions. - Open up a separate tab in your console and stream logs in there via
serverless logs -f myFunction -t. - Write tests to run locally.
Larger Projects
- Break your application/project into multiple Serverless Services.
- Model your Serverless Services around Data Models or Workflows.
- Keep the Functions and Resources in your Serverless Services to a minimum.
Cheat Sheet
A handy list of commands to use when developing with the Serverless Framework.
Create A Service:
Creates a new Service
serverless create -p [SERVICE NAME] -t kubeless-python
serverless create -p [SERVICE NAME] -t kubeless-nodejs
Deploy All
Use this when you have made changes to your Functions, Events or Resources in serverless.yml or you simply want to deploy all changes within your Service at the same time.
serverless deploy
Deploy Function
Use this to quickly overwrite your Kubeless Functinos, allowing you to develop faster.
serverless deploy function -f [FUNCTION NAME]
Invoke Function
Invokes an Kubeless Function and returns logs.
serverless invoke function -f [FUNCTION NAME] -l
Streaming Logs
Open up a separate tab in your console and stream all logs for a specific Function using this command.
serverless logs -f [FUNCTION NAME]