tpiperatgod / laminar_comments

Comments of laminar
0 stars 0 forks source link

https://laminar.fun/k8s/2021-05-09-deploy-OpenFunction-on-QingCloud.html #2

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

微服务学习 - 在 QingCloud 上部署 OpenFunction | Laminar

概述OpenFunction 是一个云原生的开源 FaaS 平台(函数即服务),旨在让用户专注于他们的业务逻辑,而不必关心底层运行环境和基础设施。 该文档将描述如何在 QingCloud 上部署 OpenFunction。 欢迎访问 OpenFunction 项目主页 参与贡献。

https://laminar.fun/k8s/2021-05-09-deploy-OpenFunction-on-QingCloud.html

wey-gu commented 3 years ago

感谢分享,这一步会报错,因为 shipwright 没装

kubectl apply -f config/bundle.yaml

可以用 sh hack/deploy.sh --with-shipwright去装。

wey-gu commented 3 years ago

update,还需要 --with-openFuncAsync,否则 controller 因为 dapr CRD 不认识也起不来。

tpiperatgod commented 3 years ago

哈哈,多谢指正,因为这篇写的时候还没有加入上面这些组件,后面 release 了几个版本后就没更新内容了。。下次我会更新下

wey-gu commented 3 years ago

您好,请问本地单机部署kubesphere + openfunction 都是最新版本,的情况下如何让function 被正确解析呢?


[root@wey OpenFunction]# kubectl get svc
NAME                                                    TYPE           CLUSTER-IP      EXTERNAL-IP                                         PORT(S)                                      AGE
function-sample-serving-dxdhf-ksvc-pgxqb                ExternalName   <none>          kourier-internal.kourier-system.svc.cluster.local   80/TCP                                       39m
function-sample-serving-dxdhf-ksvc-pgxqb-v100           ClusterIP      10.233.8.200    <none>                                              80/TCP                                       39m
function-sample-serving-dxdhf-ksvc-pgxqb-v100-private   ClusterIP      10.233.31.137   <none>                                              80/TCP,9090/TCP,9091/TCP,8022/TCP,8012/TCP   39m
kubernetes                                              ClusterIP      10.233.0.1      <none>                                              443/TCP                                      34h

[root@wey OpenFunction]# kubectl get ksvc
NAME                                       URL                                                                   LATESTCREATED                                   LATESTREADY                                     READY   REASON
function-sample-serving-dxdhf-ksvc-pgxqb   http://function-sample-serving-dxdhf-ksvc-pgxqb.default.example.com   function-sample-serving-dxdhf-ksvc-pgxqb-v100   function-sample-serving-dxdhf-ksvc-pgxqb-v100   True
[root@wey OpenFunction]# tail /etc/hosts

10.233.8.200  function-sample-serving-dxdhf-ksvc-pgxqb function-sample-serving-dxdhf-ksvc-pgxqb-v100
10.233.31.137 function-sample-serving-dxdhf-ksvc-pgxqb-v100-private

# kubekey hosts BEGIN
192.168.8.137  wey.gu-137.cluster.local wey.gu-137
192.168.8.137  lb.kubesphere.local
# kubekey hosts END
[root@wey OpenFunction]# cat /etc/resolv.conf
nameserver 192.168.7.2
search localhost default.svc.cluster.local svc.cluster.local cluster.local example.com default.example.com
options ndots:5
wey-gu commented 3 years ago

请忽略吧,我手动分配给了 service 一个 externalIP,好了。

tpiperatgod commented 3 years ago

samples 里有个 workaround ,和你的方法是一样的 :grinning:

wey-gu commented 3 years ago

多谢,求助一下哈,我现在写自己 python 代码,能不通过 python builder,直接通过 docker image 启动么?不写build会直接skipped掉,😭

tpiperatgod commented 3 years ago

v0.3.0+ 版本支持通过已经在本地存在的镜像启动,不写 spec.build 跳过构建阶段是正常的,这时候会直接创建工作负载。可以贴一下您的 function 配置吗