rancher2.4.17添加现有k8s集群出错

rancher:2.4.17
k8s:1.23.1
是否是因为版本不兼容导致

curl —insecure -sfL https://xxxxxxx:9443/v3/import/sjhc5m4t5rnj872pxzvmtsvh9spwwxq68w5vz9r9bdzvdh6hpnft2k.yaml | kubectl apply -f -

报错如下:

clusterrole.rbac.authorization.k8s.io/proxy-clusterrole-kubeapiserver unchanged
clusterrolebinding.rbac.authorization.k8s.io/proxy-role-binding-kubernetes-master unchanged
namespace/cattle-system unchanged
serviceaccount/cattle unchanged
secret/cattle-credentials-d06e8c1 created
clusterrole.rbac.authorization.k8s.io/cattle-admin unchanged
Warning: spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].key: beta.kubernetes.io/os is deprecated since v1.14; use "kubernetes.io/os" instead
deployment.apps/cattle-cluster-agent configured
daemonset.apps/cattle-node-agent configured
error: unable to recognize "STDIN": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
已邀请:

hailong

赞同来自: ascend

是的,版本不兼容,K8s和Rancher 的对应关系可以参考支持矩阵:https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/rancher-v2-6-2/

要回复问题请先登录注册