前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Istio实际操作篇】Istio入门,10分钟快速安装

【Istio实际操作篇】Istio入门,10分钟快速安装

原创
作者头像
秋意零
发布2022-04-25 21:55:24
8250
发布2022-04-25 21:55:24
举报
文章被收录于专栏:YeTechLogYeTechLog

@TOC

前言

上一篇讲了什么是Istio的理论篇,这次我们就来实际操作。

想看上一篇理论篇的看这里(看完绝对有所收获):

[Istio是什么?] 还不知道你就out了,一文40分钟快速理解_小叶的技术Logs的博客-CSDN博客

本文说明 请大家务必查看

本文有两个版本,详细版、简洁版

前者适合新手,后者适合老手(方便大家查找,从而过滤掉某些步骤,节约时间成本) 所以大家按需查看哟。

详细版

简洁版

简洁版:包含所有步骤,以及命令的执行过程(适合新手)

简洁版:只包含命令(适合有一定熟练度的人)

环境准备


系统

Vcpu

Memory

集群

centos7

2

8

kubernetes

详细版

入门:搭建步骤

Istio软件包下载

安装最新软件包

代码语言:shell
复制
$ curl -L https://istio.io/downloadIstio | sh -  # 安装最新软件包

这一条命令如果下载不下来,可以直接访问下载地址:Istio下载

挑选对应的istio版本、下载对应的压缩文件,如图所示:

注意:Istio1.13.3版本,要求kubernetes最低集群版是1.19

在这里插入图片描述
在这里插入图片描述

解压软件包:

代码语言:shell
复制
[root@master istio]# ll
total 22704
-rw-r--r-- 1 root root 23245765 Apr 23 10:39 istio-1.12.3-linux-amd64.tar.gz
[root@master istio]# tar -vzxf istio-1.12.3-linux-amd64.tar.gz
istio-1.12.3/
istio-1.12.3/manifest.yaml
istio-1.12.3/bin/
istio-1.12.3/bin/istioctl
istio-1.12.3/manifests/
istio-1.12.3/manifests/examples/
istio-1.12.3/manifests/examples/customresource/
istio-1.12.3/manifests/examples/customresource/istio_v1alpha1_istiooperator_cr.yaml
istio-1.12.3/manifests/examples/user-gateway/

安装目录包含:

  • samples/ 目录下的示例应用程序
  • bin/ 目录下的 istioctl 客户端二进制文件 .

配置环境变量:

代码语言:shell
复制
[root@master istio]# cat /etc/profile
export ISTIO_HOME=/root/istio/istio-1.12.3  
export PATH=$PATH:$ISTIO_HOME/bin
代码语言:shell
复制
[root@master istio]# istioctl version
client version: 1.12.3
control plane version: 1.12.3
data plane version: 1.12.3 (10 proxies)

下载Istio

代码语言:shell
复制
[root@master ~]# istioctl install --set profile=demo -y
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/v1.12/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
! values.global.jwtPolicy is deprecated; use Values.global.jwtPolicy=third-party-jwt. See http://istio.io/latest/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for more information instead
WARNING: Istio control planes installed: 1.13.3.
WARNING: An older installed version of Istio has been detected. Running this command will overwrite it.
✔ Istio core installed
✔ Istiod installed
✔ Egress gateways installed
✔ Ingress gateways installed
✔ Installation complete                                                                                                         Making this installation the default for injection and validation.

Thank you for installing Istio 1.12.  Please take a few minutes to tell us about your install/upgrade experience!  https://forms.gle/FegQbc9UvePd4Z9z7

自动注入 Envoy 边车代理

代码语言:shell
复制
[root@master ~]#  kubectl label namespace default istio-injection=enabled
namespace/default labeled

卸载

完整卸载 Istio

代码语言:shell
复制
[root@master istio]# istioctl x uninstall --purge
All Istio resources will be pruned from the cluster
Proceed? (y/N) y
  Removed IstioOperator:istio-system:installed-state.
  Removed PodDisruptionBudget:istio-system:istio-egressgateway.
  Removed PodDisruptionBudget:istio-system:istio-ingressgateway.
  Removed PodDisruptionBudget:istio-system:istiod.
  Removed Deployment:istio-system:istio-egressgateway.
  Removed Deployment:istio-system:istio-ingressgateway.
  Removed Deployment:istio-system:istiod.
  Removed Service:istio-system:istio-egressgateway.
  Removed Service:istio-system:istio-ingressgateway.
  Removed Service:istio-system:istiod.
  Removed ConfigMap:istio-system:istio.
  Removed ConfigMap:istio-system:istio-sidecar-injector.
  Removed Pod:istio-system:istio-egressgateway-6b69dfb9f8-x7zwb.
  Removed Pod:istio-system:istio-ingressgateway-7484f57fd6-hrjjt.
  Removed Pod:istio-system:istiod-7989b7749b-rmslt.

简洁版

安装

代码语言:shell
复制
[root@master istio]# curl -L https://istio.io/downloadIstio | sh -
[root@master istio]# tar -vzxf istio-1.12.3-linux-amd64.tar.gz
[root@master istio]# cat /etc/profile
export ISTIO_HOME=/root/istio/istio-1.12.3  
export PATH=$PATH:$ISTIO_HOME/bin
[root@master ~]# istioctl install --set profile=demo -y
[root@master istio]# kubectl label namespace default istio-injection=enabled

卸载

代码语言:shell
复制
[root@master istio]# istioctl x uninstall --purge

学习不走弯路,gz号「yeTechLog」

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 前言
  • 本文说明 请大家务必查看
  • 环境准备
  • 详细版
    • 入门:搭建步骤
      • 下载Istio
      • 卸载
      • 简洁版
        • 安装
          • 卸载
          • 学习不走弯路,gz号「yeTechLog」
          相关产品与服务
          容器服务
          腾讯云容器服务(Tencent Kubernetes Engine, TKE)基于原生 kubernetes 提供以容器为核心的、高度可扩展的高性能容器管理服务,覆盖 Serverless、边缘计算、分布式云等多种业务部署场景,业内首创单个集群兼容多种计算节点的容器资源管理模式。同时产品作为云原生 Finops 领先布道者,主导开源项目Crane,全面助力客户实现资源优化、成本控制。
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档