Istio 1.1部署实践
前提条件
- 正确安装配置Kubernetes集群
- CentOS Linux release 7.5.1804
安装
下载istio 1.1版本
[root@vm157 ~]# wget https://github.com/istio/istio/releases/download/1.1.1/istio-1.1.1-linux.tar.gz …… 2019-03-26 09:39:06 (483 KB/s) - ‘istio-1.1.1-linux.tar.gz’ saved [15736205/15736205]
Istio安装有多种方式,本文根据helm template生成istio部署的配置文件,其他部署方式请参考官方文档。
[root@vm157 ~]# cd istio-1.1.1/
[root@ruffy istio-1.1.1]# helm template ../install/kubernetes/helm/istio-init --name istio-init --namespace istio-system > istio-init.yaml
[root@ruffy istio-1.1.1]# kubectl get crds | grep 'istio.io\|certmanager.k8s.io' | wc -l
[root@ruffy istio-1.1.1]# InternalIp=10.20.1.175
[root@ruffy istio-1.1.1]# helm template install/kubernetes/helm/istio --namespace istio-system \
> --set global.mtls.enabled=true \
> --set global.controlPlaneSecurityEnabled=true \
> --set gateways.istio-ingressgateway.type=NodePort \
> --set grafana.enabled=true \
> --set servicegraph.enabled=true \
> --set servicegraph.ingress.enabled=true \
> --set servicegraph.ingress.hosts={servicegraph-istio-system.${InternalIp}.nip.io} \
> --set tracing.enabled=true \
> --set tracing.jaeger.ingress.enabled=true \
> --set tracing.jaeger.ingress.hosts={jaeger-query-istio-system.${InternalIp}.nip.io} \
> --set tracing.ingress.enabled=true \
> --set tracing.ingress.hosts={tracing-istio-system.${InternalIp}.nip.io} \
> --set kiali.enabled=true \
> --set kiali.ingress.enabled=true \
> --set kiali.ingress.hosts={kiali-istio-system.${InternalIp}.nip.io} \
> --set kiali.dashboard.grafanaURL=http://grafana-istio-system.${InternalIp}.nip.io \
> --set kiali.dashboard.jaegerURL=http://jaeger-query-istio-system.${InternalIp}.nip.io \
> --name istio > ruffy/istio-${InternalIp}.yaml [root@vm175 istio-1.1.1]# cd ruffy
[root@vm175 ruffy]# ls
istio-10.20.1.175.yaml istio-init.yaml namespace.yaml
根据配置模板部署Isito组件
[root@vm175 istio-1.1.1]# kubectl apply -f ruffy/namespace.yaml
namespace/istio-system created
[root@vm175 istio-1.1.1]# kubectl apply -f ruffy/istio-init.yaml
configmap/istio-crd-10 created
configmap/istio-crd-11 created
serviceaccount/istio-init-service-account created
clusterrole.rbac.authorization.k8s.io/istio-init-istio-system configured
clusterrolebinding.rbac.authorization.k8s.io/istio-init-admin-role-binding-istio-system configured
job.batch/istio-init-crd-10 created
job.batch/istio-init-crd-11 created
[root@vm175 istio-1.1.1]# kubectl apply -f ruffy/istio-10.20.1.175.yaml
poddisruptionbudget.policy/istio-galley created
poddisruptionbudget.policy/istio-ingressgateway created
poddisruptionbudget.policy/istio-policy created
poddisruptionbudget.policy/istio-telemetry created
poddisruptionbudget.policy/istio-pilot created
……
rule.config.istio.io/promhttp created
rule.config.istio.io/promtcp created
rule.config.istio.io/promtcpconnectionopen created
rule.config.istio.io/promtcpconnectionclosed created
handler.config.istio.io/kubernetesenv created
rule.config.istio.io/kubeattrgenrulerule created
rule.config.istio.io/tcpkubeattrgenrulerule created
kubernetes.config.istio.io/attributes created
destinationrule.networking.istio.io/istio-policy created
destinationrule.networking.istio.io/istio-telemetry created
查看Isito部署状态
[root@vm175 istio-1.1.1]# kubectl -n istio-system get all NAME READY STATUS RESTARTS AGE pod/grafana-7b46bf6b7c-xr2lw 1/1 Running 0 2m
pod/istio-citadel-5878d994cc-kfm7p 1/1 Running 0 2m
pod/istio-cleanup-secrets-1.1.1-wlk7p 0/1 Completed 0 2m
pod/istio-galley-6db4964df6-9lpsl 1/1 Running 0 2m
pod/istio-grafana-post-install-1.1.1-44lv7 0/1 Completed 0 2m
pod/istio-ingressgateway-cd5df7bc6-sgh5m 0/1 Running 0 2m
pod/istio-init-crd-10-q5kvp 0/1 Completed 0 3m
pod/istio-init-crd-11-kdd25 0/1 Completed 0 3m
pod/istio-pilot-597dd58685-hsp72 1/2 Running 0 2m
pod/istio-policy-67f66c8b5c-8kqwm 2/2 Running 5 2m
pod/istio-security-post-install-1.1.1-gcjrm 0/1 Completed 0 2m
pod/istio-sidecar-injector-59fc9d6f7d-j9prx 0/1 ContainerCreating 0 2m
pod/istio-telemetry-c5bfc457f-qqzb5 2/2 Running 4 2m
pod/istio-tracing-75dd89b8b4-2t2hl 0/1 ContainerCreating 0 2m
pod/kiali-5d68f4c676-bdltq 1/1 Running 0 2m
pod/prometheus-89bc5668c-7kp8b 0/1 Init:Error 1 2m
pod/servicegraph-57bfbbd697-6tldj 0/1 Running 0 2m …… NAME DESIRED SUCCESSFUL AGE job.batch/istio-cleanup-secrets-1.1.1 1 1 2m job.batch/istio-grafana-post-install-1.1.1 1 1 2m job.batch/istio-init-crd-10 1 1 3m job.batch/istio-init-crd-11 1 1 3m job.batch/istio-security-post-install-1.1.1 1 1 2m
增加grafana和prometheus的ingress文件
Istio-grafana.yaml
[root@vm175 ruffy]# cat istio-grafana-ingress.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: grafana namespace: istio-system labels: app: grafana annotations: spec: rules:
- host: granafa-istio.10.20.1.175.xip.io http: paths:
- path: / backend: serviceName: grafana servicePort: 3000
Isito-prometheus-ingress.yaml [root@vm175 ruffy]# cat istio-prometheus-ingress.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: istio-prometheus namespace: istio-system spec: rules:
- host: prometheus-istio.10.20.1.175.xip.io http: paths:
- path: /prometheus backend: serviceName: prometheus servicePort: 9090}}}
查看部署的组件访问路径
{{{[root@vm175 ruffy]# kubectl -n istio-system get ing
NAME HOSTS ADDRESS PORTS AGE
grafana granafa-istio.10.20.1.175.xip.io 80 5m
istio-prometheus prometheus-istio.10.20.1.175.xip.io 80 5m
istio-servicegraph servicegraph-istio-system.10.20.1.175.nip.io 80 56m
istio-tracing tracing-istio-system.10.20.1.175.nip.io 80 56m
kiali kiali-istio-system.10.20.1.175.nip.io 80 56m
访问kiali时,出现secret不存在的情况,需要通过kiali-secret.yaml文件创建secret,并且重启kiali服务。
Kiali-secret.yaml文件
[root@vm175 ruffy]# cat kiali-secret.yaml apiVersion: v1 kind: Secret metadata: name: kiali namespace: istio-system labels: app: kiali type: Opaque data: username: "YWRtaW4=" passphrase: "YWRtaW4="
访问Kiali
浏览器输入地址:http://kiali-istio-system.10.2 ... iali/
用户名/密码:admin/admin

访问servicegraph
浏览器输入地址:http://servicegraph-istio-syst ... .html

访问tracing
浏览器输入地址:http://servicegraph-istio-syst ... .html

访问granafa
浏览器输入地址:http://granafa-istio.10.20.1.1 ... d%3D1

至此 Istio1.1及其依赖组件搭建完毕。
Istio 1.1部署实践的更多相关文章
- 基于AWS的自动化部署实践
过年前,我给InfoQ写了篇文章详细介绍我们团队在过去4年基于AWS的自动化部署实践.文章包括了:为什么选择AWS.AWS上自动化部署的优势和挑战.我们的解决方案,以及和AWS DevOps方案(Op ...
- 基于winserver的Apollo配置中心分布式&集群部署实践(正确部署姿势)
基于winserver的Apollo配置中心分布式&集群部署实践(正确部署姿势) 前言 前几天对Apollo配置中心的demo进行一个部署试用,现公司已决定使用,这两天进行分布式部署的时候 ...
- winserver的consul部署实践与.net core客户端使用(附demo源码)
winserver的consul部署实践与.net core客户端使用(附demo源码) 前言 随着微服务兴起,服务的管理显得极其重要.都知道微服务就是”拆“,把臃肿的单块应用,拆分成多个轻量级的 ...
- 《OpenStack部署实践》
<OpenStack部署实践> 基本信息 作者: 张子凡 丛书名: 图灵原创 出版社:人民邮电出版社 ISBN:9787115346797 上架时间:2014-2-27 出版日期:2014 ...
- Zabbix3.0部署实践
Zabbix3.0部署实践 Zabbix3整个web界面做了一个全新的设计. 1.1Zabbix环境准备 [root@linux-node1 ~]# cat /etc/redhat-release ...
- Jenkins+SVN+Maven+shell 自动化部署实践
JAVA环境中利用Jenkins+svn+maven进行自动化部署实践 一. 前言2 1.介绍jenkins2 1.本地项目打包2 2.通过secureCRT工具,手动传输到服务器2 3.然后 ...
- 基于 Docker 和 GitLab 的前端自动化部署实践笔记
基于 Docker 和 GitLab 的前端自动化部署 实践笔记 随着接触的项目越来越多,在部署测试流程上重复耗时工作也越来越多,所以对前端工作的CI/CD实现愈发迫在眉睫. 前端开发由于三大框架的崛 ...
- Istio 1.4 部署指南
原文链接:Istio 1.4 部署指南 Istio 一直处于快速迭代更新的过程中,它的部署方法也在不断更新,之前我在 1.0 版本中介绍的安装方法,对于最新的 1.4 版本已经不适用了.以后主流的部署 ...
- 理想的DevOp流程怎么做?看看Slack的代码部署实践 原创 Michael Deng 高可用架构 今天
理想的DevOp流程怎么做?看看Slack的代码部署实践 原创 Michael Deng 高可用架构 今天
随机推荐
- libevent reference Mannual III--working with events
FYI: http://www.wangafu.net/~nickm/libevent-book/TOC.html Working with events Libevent’s basic unit ...
- Git安装使用指南
Git安装使用指南 Git原理示意图 1. 安装git Linux服务器版本为Redhat6.2-64,其他版本可能有些许不同 1.1 安装依赖包 在安装git前首先安装依赖包,包括的依赖包有: cv ...
- buf.readInt32BE()
buf.readInt32BE(offset[, noAssert]) buf.readInt32LE(offset[, noAssert]) offset {Number} 0 <= offs ...
- react----父子组件之间的参数传递
1.父组件向子组件传递参数 //父组件 import React from 'react'; import './header.css' import ComponentChild from './h ...
- react入门----事件监听
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 【Codeforces 466B】Wonder Room
[链接] 我是链接,点我呀:) [题意] 让你把长为a,宽为b的房间扩大(长和宽都能扩大). 使得它的面积达到6*n 问你最小的能满足要求的面积是多少 输出对应的a和b [题解] 假设a< b ...
- Codeforces Round #226 (Div. 2) C题
数论好题 题目要求:求给定序列的素因子如果在给定区间内该数字个数加1; 思路:打表时求出包含给素数因子的数的个数,详见代码 1 #include<cstring> +; scan ...
- node.js 发布订阅模式
//导入内置模块 let EventEmitter = require('events'); let util=require('util'); //Man继承EventEmitter util.in ...
- Contemplation! Algebra 矩阵快速幂
Given the value of a+b and ab you will have to find the value of a n + b n Input The input file cont ...
- [转] python 获取本机ip地址的两种实现方法
#!/usr/bin/python import socket import fcntl import struct def get_ip_address(ifname): s = socket.so ...