创建ingress报错Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": failed to call webhook 。。ingress-nginx-controller-admission
创建ingress报错如下
[root@k8s-master01 gitlab]# kubectl apply -f 03-gitlab-ingress.yaml
Error from server (InternalError): error when creating "03-gitlab-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": x509: certificate is valid for kubernetes, kubernetes.default, kubernetes.default.svc, kubernetes.default.svc.cluster, kubernetes.default.svc.cluster.local, not ingress-nginx-controller-admission.ingress-nginx.svc
执行
[root@k8s-master01 gitlab]# kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
validatingwebhookconfiguration.admissionregistration.k8s.io "ingress-nginx-admission" deleted
再次创建ingress
[root@k8s-master01 gitlab]# kubectl apply -f 03-gitlab-ingress.yaml
ingress.networking.k8s.io/gitlab-ingress created