使用 kong ingress 时出现错误 {"message":"failure to get a Peer from the Ring-Balancer"}

Vik*_*lra 10 kubernetes kong kubernetes-ingress kong-ingress

当我尝试使用公共IP访问时收到错误消息:

"{"message":"failure to get a peer from the ring-balancer"}"
Run Code Online (Sandbox Code Playgroud)

看来Kong无法提供上游服务。

我正在使用投票应用程序

入口.yaml

"{"message":"failure to get a peer from the ring-balancer"}"
Run Code Online (Sandbox Code Playgroud)

服务.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: telehealth-ingress
  namespace: kong
  annotations:
    kubernetes.io/ingress.class: "kong"
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: voting-service
          servicePort: 80
Run Code Online (Sandbox Code Playgroud)

部署.yaml

apiVersion: v1
kind: Service
metadata:
  name: voting-service
  labels:
    name: voting-service
    app: voting-app
spec:
  ports:
    - targetPort: 80
      port: 80
  selector:
    name: voting-app-pod
    app: voting-app
Run Code Online (Sandbox Code Playgroud)

Ric*_*ico 11

这里可能有很多问题之一。但本质上你的入口无法到达你的后端。

如果您的后端已启动并正在运行?

此问题可能会让您了解为什么无法访问后端服务。您看到什么 http 错误代码?