# Istio Installer
Note: If making any changes to the charts or values.yaml in this dir, first read [UPDATING-CHARTS.md](UPDATING-CHARTS.md)
Istio installer is a modular, 'a-la-carte' installer for Istio. It is based on a
fork of the Istio helm templates, refactored to increase modularity and isolation.
Goals:
- Improve upgrade experience: users should be able to gradually roll upgrades, with proper
canary deployments for Istio components. It should be possible to deploy a new version while keeping the
stable version in place and gradually migrate apps to the new version.
- More flexibility: the new installer allows multiple 'environments', allowing applications to select
a set of control plane settings and components. While the entire mesh respects the same APIs and config,
apps may target different 'environments' which contain different instances and variants of Istio.
- Better security: separate Istio components reside in different namespaces, allowing different teams or
roles to manage different parts of Istio. For example, a security team would maintain the
root CA and policy, a telemetry team may only have access to Prometheus,
and a different team may maintain the control plane components (which are highly security sensitive).
The install is organized in 'environments' - each environment consists of a set of components
in different namespaces that are configured to work together. Regardless of 'environment',
workloads can talk with each other and obey the Istio configuration resources, but each environment
can use different Istio versions and different configuration defaults.
`istioctl kube-inject` or the automatic sidecar injector are used to select the environment.
In the case of the sidecar injector, the namespace label `istio-env: <NAME_OF_ENV>` is used instead
of the conventional `istio-injected: true`. The name of the environment is defined as the namespace
where the corresponding control plane components (config, discovery, auto-injection) are running.
In the examples below, by default this is the `istio-control` namespace. Pod annotations can also
be used to select a different 'environment'.
## Installing
The new installer is intended to be modular and very explicit about what is installed. It has
far more steps than the Istio installer - but each step is smaller and focused on a specific
feature, and can be performed by different people/teams at different times.
It is strongly recommended that different namespaces are used, with different service accounts.
In particular access to the security-critical production components (root CA, policy, control)
should be locked down and restricted. The new installer allows multiple instances of
policy/control/telemetry - so testing/staging of new settings and versions can be performed
by a different role than the prod version.
The intended users of this repo are users running Istio in production who want to select, tune
and understand each binary that gets deployed, and select which combination to use.
Note: each component can be installed in parallel with an existing Istio 1.0 or 1.1 install in
`istio-system`. The new components will not interfere with existing apps, but can interoperate
and it is possible to gradually move apps from Istio 1.0/1.1 to the new environments and
across environments ( for example canary -> prod )
Note: there are still some cluster roles that may need to be fixed, most likely cluster permissions
will need to move to the security component.
## Everything is Optional
Each component in the new installer is optional. Users can install the component defined in the new installer,
use the equivalent component in `istio-system`, configured with the official installer, or use a different
version or implementation.
For example you may use your own Prometheus and Grafana installs, or you may use a specialized/custom
certificate provisioning tool, or use components that are centrally managed and running in a different cluster.
This is a work in progress - building on top of the multi-cluster installer.
As an extreme, the goal is to be possible to run Istio workloads in a cluster without installing any Istio component
in that cluster. Currently the minimum we require is the security provider (node agent or citadel).
### Install Istio CRDs
This is the first step of the install. Please do not remove or edit any CRD - config currently requires
all CRDs to be present. On each upgrade it is recommended to reapply the file, to make sure
you get all CRDs. CRDs are separated by release and by component type in the CRD directory.
Istio has strong integration with certmanager. Some operators may want to keep their current certmanager
CRDs in place and not have Istio modify them. In this case, it is necessary to apply CRD files individually.
```bash
kubectl apply -k github.com/istio/installer/base
```
or
```bash
kubectl apply -f base/files
```
### Install Istio-CNI
This is an optional step - CNI must run in a dedicated namespace, it is a 'singleton' and extremely
security sensitive. Access to the CNI namespace must be highly restricted.
**NOTE:** The environment variable `ISTIO_CLUSTER_ISGKE` is assumed to be set to `true` if the cluster
is a GKE cluster.
```bash
ISTIO_CNI_ARGS=
# TODO: What k8s data can we use for this check for whether GKE?
if [[ "${ISTIO_CLUSTER_ISGKE}" == "true" ]]; then
ISTIO_CNI_ARGS="--set cni.cniBinDir=/home/kubernetes/bin"
fi
iop kube-system istio-cni $IBASE/istio-cni/ ${ISTIO_CNI_ARGS}
```
TODO. It is possible to add Istio-CNI later, and gradually migrate.
### Install Control plane
This can run in any cluster. A mesh should have at least one cluster should run Pilot or equivalent XDS server,
and it is recommended to have Pilot running in each region and in multiple availability zones for multi cluster.
```bash
iop istio-control istio-discovery $IBASE/istio-control/istio-discovery \
--set global.istioNamespace=istio-system
# Second istio-discovery, using master version of istio
TAG=latest HUB=gcr.io/istio-testing iop istio-master istio-discovery-master $IBASE/istio-control/istio-discovery \
--set policy.enable=false \
--set global.istioNamespace=istio-master
```
### Gateways
A cluster may use multiple Gateways, each with a different load balancer IP, domains and certificates.
Since the domain certificates are stored in the gateway namespace, it is recommended to keep each
gateway in a dedicated namespace and restrict access.
For large-scale gateways it is optionally possible to use a dedicated pilot in the gateway namespace.
### Additional test templates
A number of helm test setups are general-purpose and should be installable in any cluster, to confirm
Istio works properly and allow testing the specific install.
istio 资源包 Linux版
需积分: 0 128 浏览量
更新于2023-10-17
收藏 41.29MB GZ 举报
Istio是一款强大的服务网格平台,它为微服务架构提供了流量管理、安全、可观测性和控制等关键功能。这个资源包是专为Linux系统设计的,让我们深入了解一下Istio在Linux环境中的应用及其核心概念。
Istio的核心组件包括数据平面(Envoy代理)和服务网格控制平面(Pilot、 Citadel、Galley和Mixer)。Envoy代理作为Sidecar模式运行,与每个服务实例一同部署,负责拦截和处理服务间的通信。Pilot负责提供智能路由和流量管理,Citadel确保安全性和身份验证,Galley处理配置验证和分发,而Mixer则执行策略和遥测数据收集。
在Linux环境下安装Istio,首先需要确保系统满足以下前提条件:Kubernetes集群(版本1.12或更高)和Docker(18.06或更高)。下载并解压istio-1.8.4压缩包后,您将获得包含各种脚本和配置文件的目录结构。
安装步骤如下:
1. **安装 Istio Operator**:使用`istioctl operator init`命令初始化Istio Operator,它将创建一个CRD(CustomResourceDefinition)和一个Operator Pod,用于管理Istio组件的安装。
2. **创建Istio控制平面**:通过编写或引用Istio官方提供的YAML配置文件,如`istio-control/istio-complete.yaml`,使用`kubectl apply`命令部署Istio控制平面。
3. **注入Envoy代理**:默认情况下,Istio会自动注入Envoy代理到新创建的Pod中。如果需要手动注入,可以使用`istioctl kube-inject`命令修改Pod模板。
4. **配置Ingress Gateway**:Istio的Ingress Gateway允许外部流量进入服务网格。配置Ingress Gateway需要创建相关的Service和Deployment资源。
5. **启用和配置Telemetry**:Istio提供了丰富的可观测性工具,如Prometheus和Grafana。通过调整配置,可以收集和分析服务网格中的度量和日志。
6. **流量管理**:Istio的流量管理能力非常强大,例如通过VirtualService和DestinationRule定义服务路由规则、重试策略、超时和熔断等。
7. **安全性**:Istio的Citadel组件负责密钥和证书的管理和分发,实现服务间的MTLS(Mutual TLS)通信。通过设置ServiceEntry和WorkloadEntry,可以控制服务的访问权限。
8. **监控和诊断**:Istio提供了一套全面的监控和诊断工具,包括Kiali(服务网格可视化)、Jaeger(追踪)、Prometheus(指标)和Grafana(仪表盘)。
9. **持续升级和维护**:Istio可以通过`istioctl upgrade`命令进行平滑升级,并且可以使用`istioctl analyze`检查配置的正确性和一致性。
了解并熟练掌握以上知识点,您就能在Linux环境中有效地部署和管理Istio服务网格,实现高效、安全的服务间通信。同时,随着对Istio的深入学习,您将能够解决复杂的服务发现、流量管理和安全问题,进一步优化微服务架构的性能和可靠性。

suadmin
- 粉丝: 1
- 资源: 2
最新资源
- C语言为什么经久不衰?从嵌入式到操作系统,揭秘底层开发的王者语言.pdf
- C语言头文件设计原则:避免重复包含与模块化编程技巧.pdf
- C语言文件操作全攻略:加密存储+异常处理最佳实践.pdf
- C语言文件操作全攻略:从文本读写到二进制序列化.pdf
- C语言位运算实战指南:状态标志、掩码与位域的精妙用法.pdf
- C语言文件操作实战:从文本读写到CSV解析的完整案例库.pdf
- C语言项目实战:手把手教你开发通讯录管理系统.pdf
- C语言项目实战:从零开发学生管理系统.pdf
- C语言项目实战:学生成绩管理系统开发全流程.pdf
- C语言效率优化技巧:从时间复杂度分析到代码重构实战.pdf
- C语言效率革命:VSCode配置+自动化编译的终极工作流.pdf
- C语言新手必看!从HelloWorld到循环结构,手把手避开17个语法陷阱.pdf
- C语言新手必踩的10大坑:段错误、野指针与缓冲区溢出全解析.pdf
- C语言新手必看!17个编译警告背后的致命隐患.pdf
- C语言新手必看:分号漏写、括号不匹配?10分钟掌握语法细节自查表.pdf
- C语言性能优化秘籍:从寄存器变量到汇编级调优.pdf