无法将基本的 OpenWhisk 操作部署到使用 Minikube 运行的 Kubernetes 上

问题描述

我正在尝试设置一个在 Kubernetes 上运行的 Apache OpenWhisk 无服务器框架的简单 POC。我正在使用带有 Minikube 的 MacOS。以下是规格:

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

以下是 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

使用 Helm 安装 OpenWhisk:

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

配置 Whisk CLI:

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

通过键入以下内容确认 Minikube 的 192.168.49.2 IP 地址:

$ minikube ip

这是我的 mycluster.yaml 文件:

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

nginx:
  httpsNodePort: 31001

我检查了我的 OpenWhisk 设置的运行状况:

$ 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

最后,我在 these instructions taken directly from the OpenWhisk documentation 之后创建了一个简单的 hello world 动作。当我尝试测试操作时,出现网络超时:

$ wsk action create helloJS hello.js

错误:无法创建动作'helloJS':输入“https://192.168.49.2:31001/api/v1/namespaces/_/actions/helloJS?overwrite=false”:拨tcp 192.168.49.2:31001:输入输出超时

我尝试使用 -d 开关打开调试模式,但无法充分了解我所看到的反馈。

我的感觉是,要么是这里工作中存在错误,要么是 Mac 上的 Minikube 从未打算在 OpenWhisk 上得到完全支持。

任何人都可以建议我可以尝试使此设置和操作正常工作吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)