istio 安装试用

1. 命令行工具
  1. curl -L https://git.io/getIstio | sh -
2. 环境变量配置
  1. export PATH=$PWD/bin:$PATH
3. RBAC 检验
  1. kubectl api-versions | grep rbac
以下为官方介绍:
If the command displays an error, or does not display anything, it means the cluster does not support RBAC, and you can proceed to step 5 below.
If the command displays beta’ version, or both ‘alpha’ and beta’, please apply istio-rbac-beta.yaml configuration:
kubectl apply -f install/kubernetes/istio-rbac-beta.yaml
Copy
If you get an error
Error from server (Forbidden): error when creating "install/kubernetes/istio-rbac-beta.yaml": clusterroles.rbac.authorization.k8s.io "istio-manager" is forbidden: attempt to grant extra privileges: [{[*] [istio.io] [istioconfigs] [] []} {[*] [istio.io] [istioconfigs.istio.io] [] []} {[*] [extensions] [thirdpartyresources] [] []} {[*] [extensions] [thirdpartyresources.extensions] [] []} {[*] [extensions] [ingresses] [] []} {[*] [] [configmaps] [] []} {[*] [] [endpoints] [] []} {[*] [] [pods] [] []} {[*] [] [services] [] []}] user=&{user@example.org [...]
Copy
You need to add the following: (replace the name with your own)
kubectl create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=myname@example.org
Copy
If the command displays only ‘alpha’ version, please apply istio-rbac-alpha.yaml configuration:
kubectl apply -f install/kubernetes/istio-rbac-alpha.yaml
4. 安装核心组件(注意service type 的定义)
  1. kubectl apply -f install/kubernetes/istio.yaml
  1. kubectl apply -f install/kubernetes/istio-auth.yaml
5. 监控组件安装
kubectl apply -f install/kubernetes/addons/prometheus.yaml
kubectl apply -f install/kubernetes/addons/grafana.yaml
kubectl apply -f install/kubernetes/addons/servicegraph.yaml
6. bookinfo 例子安装
  1. kubectl apply -f <(istioctl kube-inject -f samples/apps/bookinfo/bookinfo.yaml)
7. 几个问题

安装需要使用serviceaccount 注意配置,istioctl 需要使用kubectl config 注意配置
主要是 kubectl config set-cluster kubectl config set-context  kubectl use-context 命令
因为部分容器需要按照特权模式运行,需要配置apiserver controller-manager  --allow-privileged=true
同时服务默认部分使用的是云平台的loadblance 测试环境可能没有,所以需要改为NodePort

8. 总结

        总之安装还是比较简单的,但是还需要深入研究,每个组件的设计,以及功能。
9. 参考文档



posted on   荣锋亮  阅读(1149)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示