1. 查看k8s对应的calico的版本 https://projectcalico.docs.tigera.io/archive/v3.20/getting-started/kubernetes/requirements

2.执行 

kubectl apply -f https://docs.projectcalico.org/v3.20/manifests/calico.yaml

注意:若有 no matches for kind "PodDisruptionBudget" in version "policy/v1" 抱错,则是calico和k8s版本不对应,则需要查看当前安装的k8s 对应的calico版本,然后将命令修改为对应的版本号,直接重新执行即可

error: unable to recognize "https://docs.projectcalico.org/v3.24/manifests/calico.yaml": no matches for kind "PodDisruptionBudget" in version "policy/v1"

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐