将 ingress.yaml 开头的
apiVersion: extensions/v1beta1
改为
apiVersion: networking.k8s.io/v1
已经测试过了,改完之后报错信息变为error: error validating "rancher/templates/ingress.yaml": error validating data: [ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "serviceName" in io.k8s.api.networking.v1.IngressBackend, ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "servicePort" in io.k8s.api.networking.v1.IngressBackend, ValidationError(Ingress.spec.rules[0].http.paths[0]): missing required field "pathType" in io.k8s.api.networking.v1.HTTPIngressPath]; if you choose to ignore these errors, turn validation off with --validate=false
@爱意平升起: 参考 Kubernetes 升级后 ingress api 变化带来的问题
@dudu: 我的情况跟这个好像有点不一样~
@dudu: 感谢,根据这个链接成功了
$ kubectl apply -f minio-ingress.yaml
Error from server (BadRequest): error when creating "minio-ingress.yaml": Ingress in version "v1" cannot be handled as a Ingress: strict decoding error: unknown field "spec.rules[0].http.paths[0].backend.serviceName", unknown field "spec.rules[0].http.paths[0].backend.servicePort"