我的环境:mac 上的 k3d+openFaas 我正在使用 OpenFaas 部署我的第一个 python 函数,但失败了。
beatles@xxxxxMBP openfaas % faas-cli deploy -f ./cpu.yml
Deploying: float-operation.
WARNING! You are not using an encrypted connection to the gateway, consider using HTTPS.
Is OpenFaaS deployed? Do you need to specify the --gateway flag?
Put "http://gateway.openfaas:8080/system/functions": dial tcp: lookup gateway.openfaas: no such host
Function 'float-operation' failed to deploy with status code: 500
我想这可能是一个gateway问题,但我不知道它实际上是如何工作的。
我已经查看了官方的故障排除和Alex的教程Vedio,我看到他使用了
-g http://xxxxx
,但我不知道它是什么?
beatles@xxxxMBP openfaas % kubectl get service -n openfaas
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
alertmanager ClusterIP 10.43.116.214 <none> 9093/TCP 15d
gateway-external NodePort 10.43.191.86 <none> 8080:31112/TCP 15d
gateway ClusterIP 10.43.216.241 <none> 8080/TCP 15d
nats ClusterIP 10.43.163.95 <none> 4222/TCP 15d
prometheus ClusterIP 10.43.131.242 <none> 9090/TCP 15d
我修复了,过程记录在Github上 问题