首页 新闻 搜索 专区 学院

K3S部署rancher过程中报错:error: unable to recognize "rancher/templates/ingress.yaml"

0
悬赏园豆:10 [已解决问题] 解决于 2022-10-10 11:41

使用K3S部署rancher过程中,执行命令:
k3s kubectl -n cattle-system apply -R -f ./rancher

报错信息:

error: unable to recognize "rancher/templates/ingress.yaml": no matches for kind "Ingress" in version "extensions/v1beta1"

网上找了很多答案,但是都是K3S版本,有没有大神可以解决~感谢

学费了我学费了的主页 学费了我学费了 | 初学一级 | 园豆:179
提问于:2022-03-07 21:23
< >
分享
最佳答案
0

将 ingress.yaml 开头的

apiVersion: extensions/v1beta1

改为

apiVersion: networking.k8s.io/v1
收获园豆:10
dudu | 高人七级 |园豆:35033 | 2022-03-07 21:31

已经测试过了,改完之后报错信息变为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

学费了我学费了 | 园豆:179 (初学一级) | 2022-03-07 21:32
dudu | 园豆:35033 (高人七级) | 2022-03-07 21:34

@dudu: 我的情况跟这个好像有点不一样~

学费了我学费了 | 园豆:179 (初学一级) | 2022-03-08 09:24

@dudu: 感谢,根据这个链接成功了

gocpplua | 园豆:202 (菜鸟二级) | 2023-01-11 17:17
其他回答(1)
0

$ 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"

gocpplua | 园豆:202 (菜鸟二级) | 2023-01-11 17:13
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册