我正在嘗試安裝istio在我的 DO K8s 集群中。
我istio使用此示例創建了一個空資源來下載和運行掌舵圖 - https://mohsensy.github.io/sysadmin/2021/04/09/install-istio-with-terraform.html
TF看起來像-
resource "kubernetes_namespace" "istio_system" {
metadata {
name = "istio-system"
}
}
resource "null_resource" "istio" {
provisioner "local-exec" {
command = <<EOF
set -xe
cd ${path.root}
rm -rf ./istio-1.9.2 || true
curl -sL https://istio.io/downloadIstio | ISTIO_VERSION=1.9.2 sh -
rm -rf ./istio || true
mv ./istio-1.9.2 istio
EOF
}
triggers = {
build_number = timestamp()
}
}
resource "helm_release" "istio_base" {
name = "istio-base"
chart = "istio/manifests/charts/base"
timeout = 120
cleanup_on_fail = true
force_update = true
namespace = "istio-system"
depends_on = [
digitalocean_kubernetes_cluster.k8s_cluster,
kubernetes_namespace.istio_system,
null_resource.istio
]
}
我可以看到istio圖表是與 CRD 一起下載的。
│ Error: failed to install CRD crds/crd-all.gen.yaml: unable to recognize "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
│
│ with helm_release.istio_base,
│ on istio.tf line 32, in resource "helm_release" "istio_base":
│ 32: resource "helm_release" "istio_base" {
我需要幫助來理解unable to recognize ""這里所說的內容!
我正在尋找帶有一些解釋的解決方案。
uj5u.com熱心網友回復:
該錯誤試圖幫助您:
unable to recognize "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
查看 Kubernetes 環境中可用的 API 資源:
$ kubectl api-resources | grep CustomResourceDefinition
您可能會看到如下內容:
customresourcedefinitions crd,crds apiextensions.k8s.io/v1 false CustomResourceDefinition
請注意那里的 API 版本:它是aspiextensions.k8s/io/v1,而不是/v1beta1。您的清單是為舊版本的 Kubernetes 構建的。更改是您只需apiVersion將清單中的值更改為正確的值,它就會起作用。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/456906.html
標籤:Kubernetes 地形 kubernetes-helm 数字海洋 istio
