AKS Ingress Nginx外部IP不可达



我正在使用helm charts在Azure Kubernetes Service中使用Ingress-nginx部署应用我的掌舵图上个月工作得很好,但是当我用我的图表创建一些新的东西时,我的入口nginx的公共IP不再工作了。

PS C:ZetarisHelmDeployment> kubectl get ingress -n zetaris
NAME                   CLASS    HOSTS                             ADDRESS       PORTS     AGE
xx-gui-nginx           <none>   uisaas.xxxxxxxxxxxxxx             20.167.72.8   80, 443   53m
xx-rest-nginx          <none>   restsaas.xxxxx                    20.167.72.8   80, 443   55m

这是我的网址:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lightning-gui-nginx
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: letsencrypt-enterprise
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "server: hide";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "X-Frame-Options: DENY";
more_set_headers "X-Xss-Protection: 1";
more_set_headers "referrer-policy: no-referrer";
more_set_headers "Content-Security-Policy: frame-ancestors 'none'";
spec:
tls:
- hosts:
- {{ .Values.ingress.guiurl }}
secretName: tls-secret-gui
rules:
- host: {{ .Values.ingress.guiurl }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: xx-gui-svc
port:
number: 80
---
apiVersion: v1
kind: Service
metadata:
name: xx-gui-svc
namespace: {{ .Values.namespace }}
spec:
ports:
- port: 80
targetPort: 9001
type: ClusterIP
selector:
app: {{ .Values.deployment.name }}

如果我直接端口转发我的pod,我可以到达端口9001上的应用程序。错误来自IP:Telnet 20.167.72.8 80

Connecting To 20.167.72.8...Could not open connection to the host, on port 80: Connect failed

据我所知,AKS没有IP限制或防火墙。你知道为什么我的入口IP不能在互联网上访问吗?

尝试创建另一个具有相同helm chart的应用程序,卸载并重新安装入口服务,公共IP无法访问。

没关系,我发现了这个问题,需要添加:

--set controller.service.annotations."service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path"=/healthz"

创建ingress-nginx

最新更新