Im having trouble invoking functions using kubeless. Here is the function spec
---
apiVersion: kubeless.io/v1beta1
kind: Function
metadata:
name: smk
namespace: smktest
spec:
handler: hello.handler
runtime: python2.7
function: |
import json
def handler():
return "hello world"
deployment:
spec:
template:
spec:
containers:
- env:
- name: FOO
value: bar
name: "smk-deployment"
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
When I try to call the function as below,
kubeless function call smk
I get
FATA[0000] Unable to find the service for smk
Two part question
- How do I expose my function as a service
- How do I specify Environment variables needed by this function ? Thank you
Update Running kubeless function ls --namespace=smktest yields below
NAME NAMESPACE HANDLER RUNTIME DEPENDENCIES STATUS
smk smktest hello.handler python2.7 MISSING: Check controller logs
Next I tried kubectl logs -n kubeless -l kubeless=controller
there's tons of error logs but I don't see anything specific to this function