skip to Main Content

I am trying to setup a simple POC of Apache OpenWhisk serverless framework running on Kubernetes. I am using MacOS with Minikube. Here are the specs:

Kubernetes: v1.20.2
Minikube: v1.17.0
Docker: 20.10.0-rc1, 4.26GB allocated

Here are the setup steps for Minikube:

$ minikube start --cpus 2 --memory 4096 --kubernetes-version=v1.20.2
$ minikube ssh -- sudo ip link set docker0 promisc on
$ kubectl create namespace openwhisk
$ kubectl label nodes --all openwhisk-role=invoker

Install OpenWhisk using Helm:

$ helm install owdev ./helm/openwhisk -n openwhisk --create-namespace -f mycluster.yaml

Configure Whisk CLI:

$ wsk property set --apihost 192.168.49.2:31001
$ wsk property set --auth 23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP

The 192.168.49.2 IP address of Minikube was confirmed by typing:

$ minikube ip

Here is my mycluster.yaml file:

whisk:
  ingress:
    type: NodePort
    apiHostName: 192.168.49.2
    apiHostPort: 31001

nginx:
  httpsNodePort: 31001

I checked the health of my OpenWhisk setup:

$ kubectl get pods -n openwhisk
NAME                                                          READY   STATUS      RESTARTS   AGE
owdev-alarmprovider-5b86cb64ff-q86nj                          1/1     Running     0          137m
owdev-apigateway-bccbbcd67-7q2r8                              1/1     Running     0          137m
owdev-controller-0                                            1/1     Running     13         137m
owdev-couchdb-584676b956-7pxtc                                1/1     Running     0          137m
owdev-gen-certs-7227t                                         0/1     Completed   0          137m
owdev-init-couchdb-g6vhb                                      0/1     Completed   0          137m
owdev-install-packages-sg2f4                                  1/1     Running     0          137m
owdev-invoker-0                                               1/1     Running     1          137m
owdev-kafka-0                                                 1/1     Running     0          137m
owdev-kafkaprovider-5574d4bf5f-vvdb9                          1/1     Running     0          137m
owdev-nginx-86749d59cb-mxxrt                                  1/1     Running     0          137m
owdev-redis-d65649c5b-vd8d4                                   1/1     Running     0          137m
owdev-wskadmin                                                1/1     Running     0          137m
owdev-zookeeper-0                                             1/1     Running     0          137m
wskowdev-invoker-00-13-prewarm-nodejs10                       1/1     Running     0          116m
wskowdev-invoker-00-14-prewarm-nodejs10                       1/1     Running     0          116m
wskowdev-invoker-00-15-whisksystem-invokerhealthtestaction0   1/1     Running     0          112m

Finally, I created a simple hello world action following these instructions taken directly from the OpenWhisk documentation. When I try to test the action, I get a network timeout:

$ wsk action create helloJS hello.js

error: Unable to create action ‘helloJS’: Put "https://192.168.49.2:31001/api/v1/namespaces/_/actions/helloJS?overwrite=false": dial tcp 192.168.49.2:31001: i/o timeout

I tried turning on debug mode with the -d switch, but could not make much of what feedback I am seeing.

My feeling is that there is either a bug at work here, or perhaps Minikube on Mac was never intended to be fully supported on OpenWhisk.

Can anyone suggest what I might try to get this setup and action working?

2

Answers


  1. We stopped maintaining OpenWhisk for Minikube a while ago. With the availability of a full-fledged Kubernetes cluster built-in to Docker Desktop on MacOS and Windows and kind (https://kind.sigs.k8s.io) being available on all of our platforms supporting Minikube was more work than it was worth.

    Login or Signup to reply.
  2. Wait until the pod (starting with the name owdev-install-packages-) packages completes.
    This may take some time, after that it should work.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search