我正在尝试在Kubernetes集群上安装Istio。我创建了一个三节点群集,并安装了istioctl 1.1.0版本。 istio安装随附位于istio-demo.yaml
目录中的install/kubernetes/istio-demo.yaml
文件。运行kubectl apply -f install/kubernetes/istio-demo.yaml
命令时,得到以下输出。
然后我使用kubectl get svc -n istio-system
列出了服务,我看到了这些服务
然后,当我使用kubectl get pod -n istio-system
列出豆荚时,我看不到豆荚。我要去哪里错了?
rule.config.istio.io/tcpkubeattrgenrulerule created
kubernetes.config.istio.io/attributes created
destinationrule.networking.istio.io/istio-policy created
destinationrule.networking.istio.io/istio-telemetry created
unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
istio-1.1.0]$ kubectl get namespaces
NAME STATUS AGE
default Active 11m
istio-system Active 100s
kube-node-lease Active 11m
kube-public Active 11m
kube-system Active 11m
kubectl get pod -n istio-system
NAME READY STATUS RESTARTS AGE
istio-cleanup-secrets-1.1.0-fbr87 0/1 Completed 0 3m27s
istio-grafana-post-install-1.1.0-kwz58 0/1 Completed 0 3m27s
istio-security-post-install-1.1.0-mc9wk 0/1 Completed 0 3m27s
P.s:问题的最新动态: 1.
$ kubectl api-resources | grep deployment
deployments deploy apps true
Deployment
答案 0 :(得分:2)
您可以使用以下方法检查哪些api支持当前的Kubernetes对象:
$ kubectl api-resources | grep deployment
deployments deploy apps true Deployment
因此,您正在尝试使用不推荐使用的apiVersion
extensions/v1beta1
。 kubernetes版本1.16中已弃用该功能。您似乎拥有一个版本1.16以上的kubernetes集群。
两种解决方案:
在istio-demo.yaml
中Deployment
处,将apiVersion
从extensions/v1beta1
更改为apps/v1
Istio 1.1的版本很旧,因此建议将其升级到可以解决该问题的最新版本。
还要通过运行kubectl version
来验证kubectl客户端版本和Kubernetes服务器版本是否匹配