k8s 執行 ingress yaml 文件報錯: error when creating "ingress-myapp.yaml": Internal error occurred: failed calling webhook


k8s 執行 ingress yaml 文件報錯:錯誤如下:
[root@k8s-master01 baremetal]# kubectl apply  -f ingress-test.yaml
Error from server (InternalError): error when creating "ingress-myapp.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": dial tcp 10.0.0.129:443: connect: invalid argument

查看ValidatingWebhookConfiguration
[root@k8s-master01 baremetal]# kubectl get ValidatingWebhookConfiguration
NAME                                  WEBHOOKS   AGE
ingress-nginx-admission               1          43m
network.kubesphere.io                 1          3d5h
resourcesquotas.quota.kubesphere.io   1          3d5h
users.iam.kubesphere.io               1          3d5h

刪除ingress-nginx-admission
[root@k8s-master01 baremetal]# kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
validatingwebhookconfiguration.admissionregistration.k8s.io "ingress-nginx-admission" deleted
[root@k8s-master01 baremetal]#

# 恢復正常
[root@k8s-master01 baremetal]# kubectl apply  -f ingress-test.yaml
ingress.networking.k8s.io/ngress-test created


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM