[root@k8scloude1 ~]# ll -h istio-1.14.3-linux-amd64.tar.gz-rw-r--r-- 1 root root 23M 9月22 11:34 istio-1.14.3-linux-amd64.tar.gz[root@k8scloude1 ~]# tar xf istio-1.14.3-linux-amd64.tar.gz [root@k8scloude1 ~]# lsistio-1.14.3-linux-amd64.tar.gzistio-1.14.3[root@k8scloude1 ~]# cd istio-1.14.3/[root@k8scloude1 istio-1.14.3]# lsbinLICENSEmanifestsmanifest.yamlREADME.mdsamplestools[root@k8scloude1 istio-1.14.3]# ls bin/istioctl
为了访问 istioctl,我们应该把它添加到 path 中 。
[root@k8scloude1 bin]# pwd/root/istio-1.14.3/bin[root@k8scloude1 bin]# lsistioctl#临时生效[root@k8scloude1 bin]# export PATH=/root/istio-1.14.3/bin:$PATH#永久生效[root@k8scloude1 bin]# vim /etc/profile.d/istioctl.sh[root@k8scloude1 bin]# cat /etc/profile.d/istioctl.shexport ISTIOCTL_HOME="/root/istio-1.14.3"export PATH="$ISTIOCTL_HOME/bin:$PATH"[root@k8scloude1 bin]# source /etc/profile.d/istioctl.sh
要检查 istioctl 是否在 path 里,运行 istioctl version
。你应该看到这样的输出 。
[root@k8scloude1 bin]# istioctl versionno running Istio pods in "istio-system"1.14.3
6.4 安装 IstioIstio 支持多个配置文件(profile) 。配置文件之间的区别在于所安装的组件 。
[root@k8scloude1 bin]# istioctl profile listIstio configuration profiles:defaultdemoemptyexternalminimalopenshiftpreviewremote
这些配置文件提供了对 Istio 控制平面和 Istio 数据平面 Sidecar 的定制内容 。
您可以从 Istio 内置配置文件的其中一个开始入手,然后根据您的特定需求进一步自定义配置文件 。当前提供以下几种内置配置文件:
- default:根据
IstioOperator
API 的默认设置启动组件 。建议用于生产部署和 Multicluster Mesh 中的 Primary Cluster 。
您可以运行istioctl profile dump
命令来查看默认设置 。
- demo:这一配置具有适度的资源需求 , 旨在展示 Istio 的功能 。它适合运行 Bookinfo 应用程序和相关任务 。这是通过快速开始指导安装的配置 。此配置文件启用了高级别的追踪和访问日志,因此不适合进行性能测试 。
- minimal:与默认配置文件相同,但只安装了控制平面组件 。它允许您使用 Separate Profile 配置控制平面和数据平面组件(例如 Gateway) 。
- remote:配置 Multicluster Mesh 的 Remote Cluster 。
- empty:不部署任何东西 。可以作为自定义配置的基本配置文件 。
- preview:预览文件包含的功能都是实验性 。这是为了探索 Istio 的新功能 。不确保稳定性、安全性和性能(使用风险需自负) 。
defaultdemominimalremoteemptypreview核心组件
istio-egressgateway
istio-ingressgateway
istiod
推荐用于生产部署的配置文件是 default 配置文件 。我们将安装 demo 配置文件,因为它包含所有的核心组件,启用了跟踪和日志记录,便于学习不同的 Istio 功能 。
我们也可以从 minimal 的组件开始,以后单独安装其他功能,如 ingress 和 egress 网关 。
因为我们将使用 Istio Operator 进行安装,所以我们必须先部署 Operator 。关于Istio Operator 简介可以查看https://istio.io/v1.14/zh/blog/2019/introducing-istio-operator/
要部署 Istio Operator , 请运行:
[root@k8scloude1 bin]# istioctl operator initInstalling operator controller in namespace: istio-operator using image: docker.io/istio/operator:1.14.3Operator controller will watch namespaces: istio-system Istio operator installed Installation complete
init
命令创建了 istio-operator
命名空间,并部署了 CRD、Operator Deployment 以及 operator 工作所需的其他资源 。安装完成后,Operator 就可以使用了 。要安装 Istio,我们必须创建 IstioOperator 资源,并指定我们要使用的配置文件 。
创建一个名为 istio-demo-profile.yaml的文件,内容如下:
#创建目录istioyaml,用来专门存放yaml文件[root@k8scloude1 ~]# mkdir istioyaml[root@k8scloude1 ~]# cd istioyaml/[root@k8scloude1 istioyaml]# vim istio-demo-profile.yaml#profile: demo表示使用demo配置文件安装istio[root@k8scloude1 istioyaml]# cat istio-demo-profile.yamlapiVersion: v1kind: Namespacemetadata:name: istio-system---apiVersion: install.istio.io/v1alpha1kind: IstioOperatormetadata:namespace: istio-systemname: demo-istio-installspec:profile: demo
我们还在文件中添加了命名空间资源,以创建 istio-system
命名空间 。我们需要做的最后一件事是创建资源:
[root@k8scloude1 istioyaml]# kubectl apply -f istio-demo-profile.yamlWarning: resource namespaces/istio-system is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.namespace/istio-system configuredistiooperator.install.istio.io/demo-istio-install created#可以查看istio-system命名空间下的所有资源[root@k8scloude1 istioyaml]# kubectl get all -o wide -n istio-systemNAMEREADYSTATUSRESTARTSAGEIPNODENOMINATED NODEREADINESS GATESpod/istio-egressgateway-58949b7c84-k7v6f1/1Running03m38s10.244.112.173k8scloude2<none><none>pod/istio-ingressgateway-75bc568988-9j4wv1/1Running03m38s10.244.251.238k8scloude3<none><none>pod/istiod-84d979766b-kz5sd1/1Running04m20s10.244.112.130k8scloude2<none><none>NAMETYPECLUSTER-IPEXTERNAL-IPPORT(S)AGESELECTORservice/istio-egressgatewayClusterIP10.102.56.241<none>80/TCP,443/TCP3m35sapp=istio-egressgateway,istio=egressgatewayservice/istio-ingressgatewayLoadBalancer10.107.131.65192.168.110.19015021:30093/TCP,80:32126/TCP,443:30293/TCP,31400:30628/TCP,15443:30966/TCP3m35sapp=istio-ingressgateway,istio=ingressgatewayservice/istiodClusterIP10.103.37.59<none>15010/TCP,15012/TCP,443/TCP,15014/TCP4m21sapp=istiod,istio=pilotNAMEREADYUP-TO-DATEAVAILABLEAGECONTAINERSIMAGESSELECTORdeployment.apps/istio-egressgateway1/1113m39sistio-proxydocker.io/istio/proxyv2:1.14.3app=istio-egressgateway,istio=egressgatewaydeployment.apps/istio-ingressgateway1/1113m39sistio-proxydocker.io/istio/proxyv2:1.14.3app=istio-ingressgateway,istio=ingressgatewaydeployment.apps/istiod1/1114m21sdiscoverydocker.io/istio/pilot:1.14.3istio=pilotNAMEDESIREDCURRENTREADYAGECONTAINERSIMAGESSELECTORreplicaset.apps/istio-egressgateway-58949b7c841113m39sistio-proxydocker.io/istio/proxyv2:1.14.3app=istio-egressgateway,istio=egressgateway,pod-template-hash=58949b7c84replicaset.apps/istio-ingressgateway-75bc5689881113m39sistio-proxydocker.io/istio/proxyv2:1.14.3app=istio-ingressgateway,istio=ingressgateway,pod-template-hash=75bc568988replicaset.apps/istiod-84d979766b1114m21sdiscoverydocker.io/istio/pilot:1.14.3istio=pilot,pod-template-hash=84d979766b
推荐阅读
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 二 Three光线检测-实现摄像机向鼠标点击位置滑动动画
- 一加9RT支持5G吗_一加9RT支不支持5G
- vivoX70Pro值得买吗_vivoX70Pro值不值得入手
- 创造与魔法9月14日最新礼包礼包码在哪领
- 我们平时吃的菠萝是长在?支付宝
- 暗区突围电视台免费宝箱位置在哪
- 17 基于SqlSugar的开发框架循序渐进介绍-- 基于CSRedis实现缓存的处理
- 北京广安门医院挂号攻略外地人就医看病指南
- 怎么在电脑上下载【智学网】新手教程
- 安装包里面的东西怎么下载(安装包在哪里可以下载)