serverless-kubeless: unable to call or update function

I deployed a Python function to a k8s cluster, but cannot call it directly, or update it after making changes.

However, I can call the function just fine from kubeless directly: $ kubeless function call hello --data '{"echo": "echo echo"}' {"body": "{\"message\": \"Go Serverless v1.0! Your function executed successfully!\", \"input\": {\"echo\": \"echo echo\"}}", "statusCode": 200}

Calling from serverless, however, fails:

$ serverless invoke --function hello --data '{"echo": "echo echo"}' ... Serverless: Calling function: hello... Error -------------------------------------------------- Service Unavailable

If I try to re-deploy after a change to the function:

$ serverless deploy function -f hello Serverless: Redeploying hello... Error -------------------------------------------------- Found errors while deploying the given functions: Error: Unable to update the function hello. Received: Code: 422 Message: functions.k8s.io "hello" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15

Most upvoted comments

oh thank you @ryuheechul for fixing the template! I am glad that you finally fixed your issue.

@ryuheechul could you provide us the serverless.yaml that you are trying to use along with the function code (if possible) and any data about the Kubernetes environment you are using to try to reproduce your issue?

Also note that serverless deploy list is not implemented yet in the plugin, that’s why it is not showing anything to you. If you want to list functions you can use serverless info.