kubernetes - 无法在 Kops 实例上安装 istio
问题描述
我正在尝试在 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
我正在查看服务的服务
然后,当我使用列出 pod 时,我kubectl get pod -n istio-system
看不到 pod。我哪里错了?
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
Ps:关于问题的更新:1。
$ kubectl api-resources | grep deployment
deployments deploy apps true
Deployment
- 客户端版本:version.Info{Major:"1", Minor:"17"
解决方案
您可以使用以下方式检查哪些 API 支持当前 Kubernetes 对象
$ kubectl api-resources | grep deployment
deployments deploy apps true Deployment
所以你正在尝试使用 deprecated apiVersion
extensions/v1beta1
。这在 kubernetes 版本 1.16 中已被弃用。您似乎有一个高于 1.16 版本的 kubernetes 集群。
两种解决方案:
在
istio-demo.yaml
任何你有Deployment
改变apiVersion
的extensions/v1beta1
地方apps/v1
Istio 1.1 已经很老了,所以建议将其升级到最新版本,这应该可以解决问题。
还可以通过运行验证 kubectl 客户端版本和 Kubernetes 服务器版本是否匹配kubectl version
推荐阅读
- php - 传递给 Twig\Environment::getTemplateClass() 的参数 1 必须是字符串类型,给定 null
- javascript - Uncaught SyntaxError: missing ) 在参数列表 VM874:10 之后
- css - 我无法让我的样式表加载到 github 中,(下面的链接)
- javascript - 我如何挂钩 js 函数,防止在 if 语句上执行动作并继续函数流
- c++ - 我的应用程序中可以有多个 QDialog 框和我的 MainWindow 吗?
- java - 百分比和计算利息有问题
- node.js - 使用 firebase 云函数记录 firebase 分析事件
- docker - 如何使用 docker-compose 查看所有部署
- python - 如何用它们的键替换列中的 dict?
- git - 如何将 .bundle 文件添加到 GitHub 的存储库中?