resource mapping not found for name: "default" namespace: "" from "custom-resources.yaml": no matches for kind "Installation" in version "operator.tigera.io/v1"

一、Kubernetes安装Calico报错

安装Calico时候下载Cailic

wget https://raw.githubusercontent.com/projectcalico/calico/v3.25.1/manifests/custom-resources.yaml

安装

[root@master ~]# kubectl apply -f custom-resources.yaml 

报错

[root@master ~]# kubectl apply -f custom-resources.yaml 
resource mapping not found for name: "default" namespace: "" from "custom-resources.yaml": no matches for kind "Installation" in version "operator.tigera.io/v1"
ensure CRDs are installed first
resource mapping not found for name: "default" namespace: "" from "custom-resources.yaml": no matches for kind "APIServer" in version "operator.tigera.io/v1"
ensure CRDs are installed first

二、解决办法

[root@master ~]# wget https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/tigera-operator.yaml

安装

[root@master ~]# kubectl create -f tigera-operator.yaml 

然后更换个版本

[root@master ~]# wget https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/custom-resources.yaml

修改地址为自己的pod地址

[root@master ~]# vi custom-resources.yaml

安装

[root@master ~]# kubectl create -f custom-resources.yaml
installation.operator.tigera.io/default created
apiserver.operator.tigera.io/default created

没有报错,安装后查看几点状态

[root@master ~]# kubectl get node
NAME     STATUS   ROLES           AGE   VERSION
master   Ready    control-plane   16h   v1.28.0
node01   Ready    <none>          15h   v1.28.0
node02   Ready    <none>          15h   v1.28.0

 

posted @ 2024-02-08 10:20  中仕  阅读(152)  评论(0编辑  收藏  举报