情境:我有一个AKS集群,我正在尝试将我的项目从本地主机加载到其中。当我启动我的Ansible脚本以使项目运行时,我需要登录到openfaas,但是我遇到了以下错误:
> ...\nCannot connect to OpenFaaS on URL: https:(...).com/faas. Get \"https://(..).com/faas/system/functions\": dial tcp
> xx.xxx.xxx.xxx:xxx: i/o timeout (Client.Timeout exceeded while
> awaiting headers)", "stdout_lines": ["WARNING! Using --password is
> insecure, consider using: cat ~/faas_pass.txt | faas-cli login -u user
> --password-stdin", "Calling the OpenFaaS server to validate the credentials...", "Cannot connect to OpenFaaS on URL:
> https://(...).com/faas. Get
> \"https://(...).com/faas/system/functions\": dial tcp
> xx.xxx.xxx.xxx:xxx: i/o timeout (Client.Timeout exceeded while awaiting headers)"]}我有一个从yaml文件创建的公共负载均衡器,它被链接到LB创建的DNS (.).com/ IP地址。
我的loadbalancer.yml文件:
apiVersion: v1
kind: Service
metadata:
name: loadbalancer
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 80
targetPort: 80我的入口文件:
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
name: openfaas
spec:
rules:
- host: (...).com
http:
paths:
- backend:
service:
name: openfaas
port:
number: 80
path: /faas
pathType: Prefix
tls:
- hosts:
- (...).com
secretName: (...).com
--- 我还没有发现很多具有相同情况的教程,或者它们使用内部负载平衡器。
是Azure阻止了通信吗?防火墙问题?我是否需要将LB改为内部而不是外部?
我在网上看到一位消息人士说:
如果您使用公共ip公开通过普通LoadBalancer提供的服务,则将无法访问该服务,因为尚未通过蔚蓝防火墙路由的流量将在退出时丢弃。因此,您需要使用固定的内部ip、内部LoadBalancer创建服务,并通过azure防火墙将流量路由到传出流量和传入流量。https://denniszielke.medium.com/setting-up-azure-firewall-for-analysing-outgoing-traffic-in-aks-55759d188039
但我想知道是否有可能绕过这个..。
任何帮助都是非常受欢迎的!
发布于 2022-10-02 13:17:13
后来我发现Azure已经提供了一个LB,所以您不需要创建一个LB。不是防火墙问题。转到“负载平衡”->“前端IP配置”,并选择适当的IP。
https://stackoverflow.com/questions/73742297
复制相似问题