gpt4 book ai didi

kubernetes - 无法在 kubernetes 类型中安装 CRD

转载 作者:行者123 更新时间:2023-12-04 16:23:56 26 4
gpt4 key购买 nike

我正在设置一个 kind

Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.22.1) 🖼
✓ Preparing nodes 📦 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
✓ Joining worker nodes 🚜
✓ Waiting ≤ 5m0s for control-plane = Ready ⏳
• Ready after 0s 💚
然后尝试按照 instructions 安装 ECK 运算符关于 1.6 版
kubectl apply -f https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml
但是进程失败了,好像 kind不支持 CRD...是这种情况吗?
namespace/elastic-system created
serviceaccount/elastic-operator created
secret/elastic-webhook-server-cert created
configmap/elastic-operator created
clusterrole.rbac.authorization.k8s.io/elastic-operator created
clusterrole.rbac.authorization.k8s.io/elastic-operator-view created
clusterrole.rbac.authorization.k8s.io/elastic-operator-edit created
clusterrolebinding.rbac.authorization.k8s.io/elastic-operator created
service/elastic-webhook-server created
statefulset.apps/elastic-operator created
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
unable to recognize "https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml": no matches for kind "ValidatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1"

最佳答案

您在此处看到的问题与种类无关,而是您尝试应用的 list 使用的是过时的 API 版本,这些版本已在 Kubernetes 1.22 中删除
具体来说, list 使用的是 v1beta1 版本的 customresourcedefinition 对象和 validatingadmissionwebhook 对象

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
this post 中所述那是 1.22 进入时删除的版本之一。
对此有一些修复。首先,您可以获取 list 并更改自定义资源定义以使用新的 API 版本 apiextensions.k8s.io/v1并验证admissionwebhook 使用 admissionregistration.k8s.io/v1 .
另一个修复方法是使用旧版本的 Kubernetes。如果您使用 1.21 或更早版本,则不应发生该问题,因此类似于 kind create cluster --image=kindest/node:v1.21.2应该管用。

关于kubernetes - 无法在 kubernetes 类型中安装 CRD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69054622/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com