这是 amy LAB 系统 – 我正在学习有关入口的知识。

  1. 我部署了基本/默认的 IngressController:

  2. 我尝试部署 Ingress。我从这里获取示例:


apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  ingressClassName: nginx <--- readjusted the name to fit with ingressClass from IngressController
  rules:
  - http:
      paths:
      - path: /testpath
        pathType: Prefix
        backend:
          service:
            name: test
            port:
              number: 80

遗憾的是,我遇到了以下我不太清楚的错误。有人能帮我排除故障吗?

$ kubectl apply -f ingress.yaml
Error from server (InternalError): error when creating "ingress.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": failed to call webhook: Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": dial tcp 10.107.59.228:443: connect: connection refused

0