Error from server (InternalError): error when creating “ingress.yaml“: Internal error occurred: fail

在创建ingress策略yaml文件
执行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.101.148.253:443: connect: con nection refused
在这里插入图片描述
【解决方案】
查看kubectl apply -f ingress.yaml

kubectl get validatingwebhookconfigurations

在这里插入图片描述删除ingress-nginx-admission

kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission

再执行命令,成功

kubectl apply -f ingress.yaml

在这里插入图片描述

你可能感兴趣的:(问题解决方案,运维)