istio安装文档

1、重装命令

istioctl manifest generate --set profile=demo | kubectl delete --ignore-not-found=true -f -

2、下载

参考:02、istio部署到k8s中 - 简书 (jianshu.com)

参考 Istio / 入门

curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.20.0 TARGET_ARCH=x86_64 sh -

tar -zxvf istio-1.20.0-linux-amd64.tar.gz

vim /etc/profile

export ISTIO_HOME=/opt/istio-1.20.0

source /etc/profile

echo $ISTIO_HOME

/opt/istio-1.20.0

export PATH=PWD/bin:PATH

which istioctl

root@bigData07 istio-1.20.0\]# istioctl install --set profile=demo -y 报异常: Error: failed to install manifests: errors occurred during operation: creating default tag would conflict: Error \[IST0139\] (MutatingWebhookConfiguration istio-sidecar-injector ) Webhook overlaps with others: \[istio-revision-tag-default/namespace.sidecar-injector.istio.io\]. This may cause injection to occur twice. Error \[IST0139\] (MutatingWebhookConfiguration istio-sidecar-injector ) Webhook overlaps with others: \[istio-revision-tag-default/object.sidecar-injector.istio.io\]. This may cause injection to occur twice. Error \[IST0139\] (MutatingWebhookConfiguration istio-sidecar-injector ) Webhook overlaps with others: \[istio-revision-tag-default/rev.namespace.sidecar-injector.istio.io\]. This may cause injection to occur twice. Error \[IST0139\] (MutatingWebhookConfiguration istio-sidecar-injector ) Webhook overlaps with others: \[istio-revision-tag-default/rev.object.sidecar-injector.istio.io\]. This may cause injection to occur twice. kubectl get MutatingWebhookConfiguration ![](https://file.jishuzhan.net/article/1725467689209565186/0aa782429dfc64020fcf6c448b9b4ed3.webp) kubectl delete MutatingWebhookConfiguration istio-revision-tag-default ![](https://file.jishuzhan.net/article/1725467689209565186/7356e61864e4123d6cc8c58749619385.webp) istioctl install --set profile=demo -y ![](https://file.jishuzhan.net/article/1725467689209565186/613c433e7077eacbf9f1be8157e6f372.webp) kubectl apply -f [samples/bookinfo/platform/kube/bookinfo.yaml](https://raw.githubusercontent.com/istio/istio/release-1.20/samples/bookinfo/platform/kube/bookinfo.yaml "samples/bookinfo/platform/kube/bookinfo.yaml") ![](https://file.jishuzhan.net/article/1725467689209565186/e7e3bd6efb3afcfe7b6fac1e798a2a95.webp) kubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items\[0\].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage \| grep -o "\.\*\" ![](https://file.jishuzhan.net/article/1725467689209565186/fd84d1fffe17e25c32cb51a0ffe87fda.webp) ### 对外开放应用程序 此时,BookInfo 应用已经部署,但还不能被外界访问。 要开放访问,您需要创建 [Istio 入站网关(Ingress Gateway)](https://istio.io/latest/zh/docs/concepts/traffic-management/#gateways "Istio 入站网关(Ingress Gateway)"), 它会在网格边缘把一个路径映射到路由。 kubectl apply -f [samples/bookinfo/networking/bookinfo-gateway.yaml](https://raw.githubusercontent.com/istio/istio/release-1.20/samples/bookinfo/networking/bookinfo-gateway.yaml "samples/bookinfo/networking/bookinfo-gateway.yaml") ![](https://file.jishuzhan.net/article/1725467689209565186/02f685bcddc8376789beb553891b08bc.webp)kubectl describe ns default ![](https://file.jishuzhan.net/article/1725467689209565186/66ce78afdd135c21e639f15ef12212d7.webp) ### 五、确定入站 IP 和端口 kubectl get svc istio-ingressgateway -n istio-system ![](https://file.jishuzhan.net/article/1725467689209565186/7eeaa913f90f982cfe9346c83b31338e.webp) kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports\[?(@.name=="http2")\].nodePort}' kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports\[?(@.name=="https")\].nodePort}' kubectl get po -l istio=ingressgateway -n istio-system -o jsonpath='{.items\[0\].status.hostIP}' [http://192.168.1.245:32258/productpage](http://192.168.1.245:32258/productpage "http://192.168.1.245:32258/productpage") ![](https://file.jishuzhan.net/article/1725467689209565186/9f4a244f264108c0182da2ec9e802cba.webp) ![](https://file.jishuzhan.net/article/1725467689209565186/238625958a4b78c1a8b5fe9450749f09.webp) 查看仪表盘 安装 [Kiali 和其他插件](https://github.com/istio/istio/tree/release-1.20/samples/addons "Kiali 和其他插件"),等待部署完成。 ![](https://file.jishuzhan.net/article/1725467689209565186/a535eb20a15e39e2243a35971b08c04b.webp) kubectl rollout status deployment/kiali -n istio-system ![](https://file.jishuzhan.net/article/1725467689209565186/45dba6268c633528b36e2e9458e55ffc.webp) istioctl dashboard kiali ![](https://file.jishuzhan.net/article/1725467689209565186/d6f09526c310df1d4510aa21d71b3c3a.webp) kubectl get svc -n istio-system -owide ![](https://file.jishuzhan.net/article/1725467689209565186/f2eb2046d043f2beb88a4a471411d335.webp) kubectl get all -n istio-system kubectl patch svc -n istio-system kiali -p '{"spec": {"type": "NodePort"}}' ![](https://file.jishuzhan.net/article/1725467689209565186/5657f3515429d09938cb30aa9cc0f31f.webp) [http://192.168.1.245:31582/kiali](http://192.168.1.245:31582/kiali "http://192.168.1.245:31582/kiali") ![](https://file.jishuzhan.net/article/1725467689209565186/413fe4f04cafcabac79c74b7c412b84e.webp) ##### istiod **istiod**中的'd' 代表 daemon istio ingress gateway istio ingress gateway是进入集群的大门,外部要访问网格内部需要从这个ingress gateway进入 istio egress gateway istio egress gateway是出去集群的大门。流量出去的时候走这 卸载istio istioctl x uninstall --purge 其他组件 参考:[【精选】Istio的监控组件Prometheus_istiod sidecar 流量监控 promethue-CSDN博客](https://blog.csdn.net/Micky_Yang/article/details/119300004 "【精选】Istio的监控组件Prometheus_istiod sidecar 流量监控 promethue-CSDN博客") istioctl dashboard prometheus ![](https://file.jishuzhan.net/article/1725467689209565186/7d30af83a6380de9f12ea3e60b6c585a.webp) kubectl get svc -n istio-system -owide ![](https://file.jishuzhan.net/article/1725467689209565186/aab958d36f0b8ddb323e73c93f0e91be.webp) kubectl patch svc -n istio-system prometheus -p '{"spec": {"type": "NodePort"}}' ![](https://file.jishuzhan.net/article/1725467689209565186/a2225beb363493787b72ec3eb3f7a779.webp) [http://192.168.1.245:32193/](http://192.168.1.245:32193/ "http://192.168.1.245:32193/") ![](https://file.jishuzhan.net/article/1725467689209565186/8cb11fa3ed64a220c860c1361d6643eb.webp) istioctl dashboard grafana kubectl patch svc -n istio-system grafana -p '{"spec": {"type": "NodePort"}}' ![](https://file.jishuzhan.net/article/1725467689209565186/de479c759e5d04ed22c007b6c0bc14e8.webp) [http://192.168.1.245:30262/](http://192.168.1.245:30262/ "http://192.168.1.245:30262/") ![](https://file.jishuzhan.net/article/1725467689209565186/087bda3f3f3ef1faf477804e6189f37c.webp) kubectl patch svc -n istio-system tracing -p '{"spec":{"type": "NodePort"}}' kubectl get svc -n istio-system ![](https://file.jishuzhan.net/article/1725467689209565186/ad9d1bac055304b5afe1892e38978bca.webp) [http://192.168.1.245:32295/jaeger/search](http://192.168.1.245:32295/jaeger/search "http://192.168.1.245:32295/jaeger/search") ![](https://file.jishuzhan.net/article/1725467689209565186/f35ceb9662889549d17ab59590ec3db8.webp) 参考:[Online Boutique在k8s中部署,启用istio,配置Kiali、Jaeger、Prometheus、Grafana_kiali部署_谁老是和我重名啊的博客-CSDN博客](https://blog.csdn.net/qq_52666912/article/details/131500751 "Online Boutique在k8s中部署,启用istio,配置Kiali、Jaeger、Prometheus、Grafana_kiali部署_谁老是和我重名啊的博客-CSDN博客")

相关推荐
青衫客363 小时前
浅谈Kubernetes在systemd cgroup模式下的Slice/Scope组织结构
云原生·容器·kubernetes
王九思3 小时前
Podman 介绍
docker·云原生·kubernetes·podman
Serverless社区4 小时前
进阶指南:BrowserUse + Agentrun Sandbox 最佳实践指南
运维·阿里云·云原生·serverless·函数计算
Gold Steps.7 小时前
K8S基于 Argo Rollouts 的高级版本发布实践
云原生·容器·kubernetes
王九思8 小时前
Docker访问权限问题
docker·云原生·容器
孤岛悬城8 小时前
61 K8s之Pod控制器与配置资源管理
云原生·容器·kubernetes
噎住佩奇8 小时前
kubeadm方式部署单节点k8s
云原生·容器·kubernetes
追光的孩子9 小时前
window雷池WAF安装运行文档
云原生·eureka
不做码农好多年,该何去何从。9 小时前
云原生k8s(一)
云原生·容器·kubernetes
Y.O.U..11 小时前
Kubernetes-PV(PersistentVolume)和PVC(PersistentVolumeClaim)
云原生·容器·kubernetes