Istio简介
Istio 官方推荐使用 Helm 来安装,Istio 中的很多组件都可以选择安装或开启,因此 Helm chart 也是组合式的,下载 Istio 安装包后解压可以看到 install/kubernetes/helm/istio 目录下的 Helm chart 配置文件,参考 使用 Helm 进行安装。
Istio 的安装文件中包括如下几个子 chart。
ingress
ingressgateway
egressgateway
sidecarInjectorWebhook
galley
mixer
pilot
security(citadel)
grafana
prometheus
servicegraph
tracing(jaeger)
kiali
所有的这些子 Chart 都可以通过 YAML 配置中的 enabled 标志选择性的开启,具体配置方法请参考安装包解压后的 install/kubernetes/helm/istio/README.md 文件。
istio 下载
Istio 会被安装到自己的 istio-system 命名空间,并且能够对所有其他命名空间的服务进行管理。
进入 Istio release 页面,下载对应目标操作系统的安装文件。在 macOS 或者 Linux 系统中,还可以运行下面的命令,进行下载和自动解压缩:
$ curl -L https://git.io/getLatestIstio | sh -
1
进入 Istio 包目录。假设这个包是 istio-1.0.4:
$ cd istio-1.0.4
1
安装目录中包含:
在 install/ 目录中包含了 Kubernetes 安装所需的 .yaml 文件
samples/ 目录中是示例应用
istioctl 客户端文件保存在 bin/ 目录之中。istioctl 的功能是手工进行 Envoy Sidecar 的注入,以及对路由规则、策略的管理
istio.VERSION 配置文件
将 istioctl 客户端二进制文件加到 PATH 中。 例如,在 macOS 或 Linux 系统上执行下面的命令:
$ export PATH=$PWD/bin:$PATH
1
istio 安装
选项1:通过 Helm 的 helm template 安装 Istio
将 Istio 的核心组件呈现为名为 istio.yaml 的 Kubernetes 清单文件:
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system > ./istio.yaml
1
通过清单文件安装组件
$ kubectl create namespace istio-system
$ kubectl create -f ./istio.yaml
1
2
由于istio组件中自定义了资源类型,而形成 istio.yaml文件的时候,并不是先定义再使用资源类型的顺序,所以你可以执行两遍kubectl create -f ./istio.yaml 来实现正确安装
卸载
$ kubectl delete -f ./istio.yaml
1
选项2:通过 Helm 和 Tiller 的 helm install 安装 Istio
此选项允许 Helm 和 Tiller 管理 Istio 的生命周期。
Warning 使用 Helm 升级 Istio 还没有进行全面的测试。
如果还没有为 Tiller 配置 service account,请配置一个:
$ kubectl create -f install/kubernetes/helm/helm-service-account.yaml
1
使用 service account 在您的集群中安装 Tiller:
$ helm init --service-account tiller --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.9.1 --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
1
安装 Istio:
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system
1
卸载
$ helm delete --purge istio
1
如果您的 Helm 版本低于 2.9.0,那么在重新部署新版 Istio chart 之前,您需要手动清理额外的 job 资源:
$ kubectl -n istio-system delete job --all
1
这里写了个sh脚本
install_type="templates"
#helm tiller安装
if [ install_type -eq "tiller" ]; then
kubectl create -f install/kubernetes/helm/helm-service-account.yaml
helm init --service-account tiller --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.9.1 --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
helm version
helm install install/kubernetes/helm/istio --name istio --namespace istio-system
fi
#helm templates安装
if [ install_type -eq "templates" ]; then
docker pull docker.io/istio/proxy_init:1.0.4
docker pull docker.io/istio/proxyv2:1.0.4
docker pull quay.io/coreos/hyperkube:v1.7.6_coreos.0
docker pull docker.io/istio/galley:1.0.4
docker pull docker.io/istio/mixer:1.0.4
docker pull docker.io/istio/pilot:1.0.4
docker pull docker.io/prom/prometheus:v2.3.1
docker pull docker.io/istio/citadel:1.0.4
docker pull docker.io/istio/sidecar_injector:1.0.4
helm template install/kubernetes/helm/istio --name istio --namespace istio-system > ./istio.yaml
kubectl create namespace istio-system
kubectl create -f ./istio.yaml # 运行两次,因为自定义资源 并且使用顺序错了
kubectl create -f ./istio.yaml
fi
---------------------
作者:数据架构师
来源:CSDN
版权声明:本文为博主原创文章,转载请附上博文链接!
微信关注我们
原文链接:https://yq.aliyun.com/articles/674737
转载内容版权归作者及来源网站所有!
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
相关文章
发表评论
资源下载
更多资源优质分享Android(本站安卓app)
近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。
Apache Tomcat7、8、9(Java Web服务器)
Tomcat是Apache 软件基金会(Apache Software Foundation)的Jakarta 项目中的一个核心项目,由Apache、Sun 和其他一些公司及个人共同开发而成。因为Tomcat 技术先进、性能稳定,而且免费,因而深受Java 爱好者的喜爱并得到了部分软件开发商的认可,成为目前比较流行的Web 应用服务器。
Java Development Kit(Java开发工具)
JDK是 Java 语言的软件开发工具包,主要用于移动设备、嵌入式设备上的java应用程序。JDK是整个java开发的核心,它包含了JAVA的运行环境(JVM+Java系统类库)和JAVA工具。
Sublime Text 一个代码编辑器
Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。