[英]Error install istio in GKE = the server could not find the requested resource (post `gatewaies.networking.istio.io`)
我在GKE中安裝istio時出現如下錯誤
kubernetes ver = 1.11.2-gke.18
Istio ver = 1.0.4 Kubectl = 來自 repo google 的最新版本
Error from server (NotFound): error when creating
"`install/kubernetes/istio-demo-auth.yaml`":
the server could not find the requested resource
(post `gatewaies.networking.istio.io`)
我試圖按照 GCP 上的教程進行操作: https ://cloud.google.com/kubernetes-engine/docs/tutorials/installing-istio
您缺少 istio 所需的CustomResourceDefinition
,因此收到此錯誤。 您需要從 istio 文件夾應用以下命令:
kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
這將創建所有 CRD,如虛擬服務、目的地規則等。
嘗試按照 Istio 的官方文檔將其安裝在 GKE 上:
我在安裝自定義 Istio helm chart 時也遇到了這個問題:
[tiller] 2019/11/15 21:50:52 failed install perform step: release test failed: the server could not find the requested resource (post gatewaies.networking.istio.io)
我已確認 Istio CRD 已正確安裝。 請注意已安裝的 Gateway CRD 是如何明確指出接受的復數名稱的:
status:
acceptedNames:
categories:
- istio-io
- networking-istio-io
kind: Gateway
listKind: GatewayList
plural: gateways
shortNames:
- gw
singular: gateway
我在 Helm 上創建了一個問題,看看是否是罪魁禍首,否則,我可以在 Istio 上打開一個問題,看看是否是罪魁禍首。 我很困惑這個問題的根源可能來自哪里。
**注意:**網關資源的類型是正確的:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
istio 通過定義一系列 crds(自定義資源定義)來工作,要使 istio 工作,您首先需要運行如下命令:
kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
對於我的版本(istio v1.2.0),命令是
對於我在 install/kubernetes/helm/istio-init/files/crd*yaml 中; kubectl apply -f $i; 完畢
但是當我按照文檔中的說明進行操作時,我仍然收到煩人的消息:
Error from server (NotFound): error when creating "samples/bookinfo/networking/bookinfo-gateway.yaml": the server could not find the requested resource (post gatewaies.networking.istio.io)
正如提示所暗示的那樣,找不到請求的資源“gatewaies.networking.istio.io”,然后我列出了 crds:
kubectl 獲取 crd
我得到了這樣的列表:在此處輸入圖片描述
當我看到檢查這個時,我發現了一些問題。 kubectl 發出的消息是 (post gateways.networking.istio.io),但是登記的 crd 是 post gateways.networking.istio.io,那么一切都清楚了,kubectl CLI 發出了錯誤的單詞“gateway”的復數形式,正確的形式是網關,而不是網關,所以為了滿足命令形式,crd 必須改變。 我編輯這個文件:
vim 安裝/kubernetes/helm/istio-init/files/crd-10.yaml
通過將名稱從“gateways.networking.istio.io”更改為“gateways.networking.istio.io”,現在一切正常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.