Debugging a Kubeless Function
A Kubeless function can fail at different stages of the function life cycle (for example, from deployment time to function execution time) due to a number of reasons. In this section, we are going to debug a function to identify the cause of failure.
In order to demonstrate multiple error scenarios, first, we are going to create a sample function with the following code block in the debug.py
file:
def main(event, context) name = event['data']['name'] return "Hello " + name
Error Scenario 01
Now, let's try to deploy this function using the kubeless function deploy
command:
$ kubeless function deploy debug --runtime python \ --from-file debug.py \ ...