在RKE2集群通过helm安装Rancher2.7.2(外部TLS终结)提示K8S版本问题

请大佬协助,报错如下:
[root@rancher-server1 helm_chart]# helm install rancher ./rancher-v2.7.2.tgz \

--namespace cattle-system \
--set hostname=rancher.domain.com \
--set rancherImage=harbor.domain.com/rancher/rancher \
--set systemDefaultRegistry=harbor.domain.com \
--set useBundledSystemChart=true

Error: INSTALLATION FAILED: chart requires kubeVersion: < 1.26.0-0 which is incompatible with Kubernetes v1.26.3+rke2r1

帮你翻译下:
错误:安装失败:chart 需要 kubeVersion:< 1.26.0-0, 与 Kubernetes v1.26.3+rke2r1 不兼容

明白了,已经降版本部署,但是还是出现如下报错,外部终止TLS是否必须安装cert-manager?

helm install rancher ./rancher-v2.7.1.tgz
–namespace cattle-system
–set hostname=xxhrancher.kxdigit.com
–set rancherImage=harbor.kxdigit.com/rancher/rancher
–set systemDefaultRegistry=harbor.kxdigit.com
–set useBundledSystemChart=true
–set rancherImageTag=v2.7.1
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: resource mapping not found for name: “rancher” namespace: “” from “”: no matches for kind “Issuer” in version “cert-manager.io/v1
ensure CRDs are installed first

外部终止不需要 cert-manager,但你这个命令缺少 tls=external 来指定使用外部的 tls

好的,非常感谢,这条参数困扰我很久 :joy:

为RKE2配置TLS终止,编辑 /var/lib/rancher/rke2/server/manifests/rke2-ingress-nginx-config.yaml文件内容如下:

/var/lib/rancher/rke2/server/manifests/rke2-ingress-nginx-config.yaml


apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: rke2-ingress-nginx
namespace: kube-system
spec:
valuesContent: |-
controller:
config:
use-forwarded-headers: “true”

完成编辑后,RKE2 server提示如下错误:
4月 25 15:27:34 rancher-rke2-server1 rke2[4844]: I0425 15:27:34.526253 4844 event.go:294] “Event occurred” object=“kube-system/rke2-ingress-nginx-config” fieldPath="" kind=“Addon” apiVersion=“k3s.cattle.io/v1” type=“Warning” reason=“ParseManifestFailed” message=“Parse manifest at “/var/lib/rancher/rke2/server/manifests/rke2-ingress-nginx-config.yaml” failed: yaml: line 5: mapping values are not allowed in this context”

不知是否我关于外部终止TLS的配置文件有误?

已经解决,vim编辑时注意保持每行缩进与官网格式一致即可,这个是怎么也预料不到的