当前位置:网站首页>Istio部署:快速上手微服务,
Istio部署:快速上手微服务,
2022-07-02 18:38:00 【51CTO】
下载二进制安装包
[[email protected] ~]
# $ wget https://github.com/istio/istio/releases/download/1.11.8/istio-1.11.8-linux-amd64.tar.gz
[[email protected] ~]
# tar zxvf istio-1.11.8-linux-amd64.tar.gz
[[email protected] ~]
# cd istio-1.11.8/
[[email protected] ~]
# ls
b
i
n
L
I
C
E
N
S
E
m
a
n
i
f
e
s
t
s
m
a
n
i
f
e
s
t
.
y
a
m
l
R
E
A
D
M
E
.
m
d
s
a
m
p
l
e
s
t
o
o
l
s
- 1.
- 2.
- 3.
- 4.
- 5.
samples: 示例应用程序;
bin: 包含istioctl的客户端文件,istioctl工具用于手动注入Envoy sidecar代理(边车代理)
安装Istioctl
把 istioctl 这个可执行文件拷贝到/usr/bin/目录
[[email protected] ~]
# mv bin/istioctl /usr/local/bin/ #安装Istioctl客户端工具
[[email protected] ~]
# istioctl install -y --set profile=demo
I
s
t
i
o
c
o
r
e
i
n
s
t
a
l
l
e
d
I
s
t
i
o
d
i
n
s
t
a
l
l
e
d
I
n
g
r
e
s
s
g
a
t
e
w
a
y
s
i
n
s
t
a
l
l
e
d
E
g
r
e
s
s
g
a
t
e
w
a
y
s
i
n
s
t
a
l
l
e
d
I
n
s
t
a
l
l
a
t
i
o
n
c
o
m
p
l
e
t
e
T
h
a
n
k
y
o
u
f
o
r
i
n
s
t
a
l
l
i
n
g
I
s
t
i
o
1
.
1
1
.
P
l
e
a
s
e
t
a
k
e
a
f
e
w
m
i
n
u
t
e
s
t
o
t
e
l
l
u
s
a
b
o
u
t
y
o
u
r
i
n
s
t
a
l
l
/
u
p
g
r
a
d
e
e
x
p
e
r
i
e
n
c
e
!
h
t
t
p
s:
/
/
f
o
r
m
s
.
g
l
e
/
k
W
U
L
B
R
j
U
v
7
h
H
c
i
7
T
6
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
Install:在集群上安装或重新配置Istio。
--set profile=demo:生成演示配置文件,不要等待确认

镜像下载
最好每个节点都下载,安装istio的时候会自动下载,但比较慢而且可能会下载失败。
[[email protected] ~]
# docker pull docker.io/istio/proxyv2:1.11.8
[[email protected] ~]
# docker pull istio/pilot:1.11.8
[[email protected] ~]
# docker pull istio/examples-bookinfo-details-v1:1.15.0
[[email protected] ~]
# docker pull istio/examples-bookinfo-productpage-v1:1.16.2
[[email protected] ~]
# docker pull istio/examples-bookinfo-reviews-v1:1.15.0
[[email protected] ~]
# docker pull istio/examples-bookinfo-reviews-v2:1.15.0
[[email protected] ~]
# docker pull istio/examples-bookinfo-reviews-v3:1.15.0
[[email protected] ~]
# docker pull istio/examples-bookinfo-ratings-v1:1.15.0
[[email protected] ~]
# docker pull kennethreitz/httpbin:latest
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
服务验证
1)验证Pod是否正常
[[email protected] ~]
# kubectl -n istio-system get pods
N
A
M
E
R
E
A
D
Y
S
T
A
T
U
S
R
E
S
T
A
R
T
S
A
G
E
i
s
t
i
o
-
e
g
r
e
s
s
g
a
t
e
w
a
y
-
6
6
8
5
4
b
8
4
d
f
-
s
n
j
2
z
1
/
1
R
u
n
n
i
n
g
0
4
8
m
i
s
t
i
o
-
i
n
g
r
e
s
s
g
a
t
e
w
a
y
-
7
d
f
d
6
8
7
6
d
f
-
9
m
2
q
5
1
/
1
R
u
n
n
i
n
g
0
4
8
m
i
s
t
i
o
d
-
7
f
7
5
7
7
8
f
8
6
-
c
k
k
x
8
1
/
1
R
u
n
n
i
n
g
0
4
9
m
- 1.
- 2.
- 3.
- 4.
- 5.

Pod服务状态正常!
2)验证Service服务是否正常

可以看到istio-ingressgateway入口网关的service服务异常,这是因为该服务使用的是公有云的访问方式,我们是自己的kubernetes集群环境,所以会异常。
3)修改istio-ingressgateway的访问方式
默认安装的istio-ingressgateway服务是以LoadBalancer(公有云环境)方式暴露的,服务处于pending状态而无法正常使用,需要修改为NodePort的访问方式。
[[email protected] ~]
# kubectl -n istio-system edit svc istio-ingressgateway
t
y
p
e:
N
o
d
e
P
o
r
t
#
将
L
o
a
d
B
a
l
a
n
c
e
r
修
改
为
N
o
d
e
P
o
r
t
s
t
a
t
u
s:
[[email protected] ~]
# kubectl -n istio-system get svc
i
s
t
i
o
-
i
n
g
r
e
s
s
g
a
t
e
w
a
y
N
o
d
e
P
o
r
t
1
0
.
1
0
2
.
5
0
.
2
0
1
<
n
o
n
e
>
- 1.
- 2.
- 3.
- 4.
- 5.

可以看到服务正常了。
开启default命名空间的自动注入功能
给指定命名空间打上istio-injection=enabled的标签,istio就有向该命名空间中Pod有注入权限。
[[email protected] ~]
# kubectl label namespace default istio-injection=enabled
[[email protected] ~]
# kubectl describe namespaces default | grep Labels
L
a
b
e
l
s:
i
n
j
e
c
t
i
o
n=
e
n
a
b
l
e
d
- 1.
- 2.
- 3.
安装 Kiali 和其他插件
部署 Kiali仪表板、以及Prometheus、Grafana、还有 Jaeger。
Grafana: 可视化UI界面,展示Prometheus的监控数据;
Zipkin:全链路监控工具,监控服务间的调用关系;
1)安装相关插件
[[email protected] ~]
# ls samples/addons/
e
x
t
r
a
s
g
r
a
f
a
n
a
.
y
a
m
l
j
a
e
g
e
r
.
y
a
m
l
k
i
a
l
i
.
y
a
m
l
p
r
o
m
e
t
h
e
u
s
.
y
a
m
l
R
E
A
D
M
E
.
m
d
[[email protected] ~]
# kubectl apply -f samples/addons/
[[email protected] ~]
# kubectl rollout status deployment/kiali -n istio-system
[[email protected] ~]
# kubectl -n istio-system get pod
N
A
M
E
R
E
A
D
Y
S
T
A
T
U
S
R
E
S
T
A
R
T
S
A
G
E
g
r
a
f
a
n
a
-
5
5
6
f
8
9
9
8
c
d
-
g
d
g
v
d
1
/
1
R
u
n
n
i
n
g
0
2
m
4
s
j
a
e
g
e
r
-
5
f
6
5
f
d
b
f
9
b
-
v
v
7
b
5
1
/
1
R
u
n
n
i
n
g
0
2
m
4
s
k
i
a
l
i
-
7
8
7
b
c
4
8
7
b
7
-
q
6
t
v
n
1
/
1
R
u
n
n
i
n
g
0
2
m
4
s
p
r
o
m
e
t
h
e
u
s
-
9
f
4
9
4
7
6
4
9
-
p
7
s
7
k
2
/
2
R
u
n
n
i
n
g
0
2
m
4
s
[[email protected] ~]
# kubectl -n istio-system get svc #查看Service
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.

2)修改服务访问方式
刚才部署的插件的服务默认是ClusterIP,无法在浏览器访问相关的服务,需要修改为NodePort。
[[email protected] ~]
# kubectl -n istio-system edit grafana
t
y
p
e:
N
o
d
e
P
o
r
t
[[email protected] ~]
# kubectl -n istio-system edit svc kiali
t
y
p
e:
N
o
d
e
P
o
r
t
- 1.
- 2.
- 3.
- 4.
3)浏览器访问 Kiali 仪表板
刚才已经修改了Kiali为nodeport的访问方式,在浏览器输入节点IP:port就可以进行访问了。
[[email protected] ~]
# kubectl -n istio-system get svc
k
i
a
l
i
N
o
d
e
P
o
r
t
1
0
.
9
6
.
5
3
.
1
4
5
<
n
o
n
e
>
2
0
0
0
1:
3
2
1
6
2
/
T
C
P
,
9
0
9
0:
3
0
8
0
9
/
T
C
P
2
2
m
- 1.
- 2.

卸载istio集群
卸载集群不会卸载安装的插件,安装的插件得单独卸载。


边栏推荐
- Advanced performance test series "24. Execute SQL script through JDBC"
- [pytorch learning notes] tensor
- Introduction of Ethernet PHY layer chip lan8720a
- 451-memcpy、memmove、memset的实现
- Machine learning notes - time series prediction research: monthly sales of French champagne
- The mybatieshelperpro tool can be generated to the corresponding project folder if necessary
- SQLite 3.39.0 发布,支持右外连接和全外连接
- Memory management of C
- 守望先锋世界观架构 ——(一款好的游戏是怎么来的)
- 安装单机redis详细教程
猜你喜欢

Yunna | why use the fixed asset management system and how to enable it

字典

mysql函数

PHP-Parser羽毛球预约小程序开发require线上系统

Data dimensionality reduction principal component analysis

数据降维——因子分析

Markdown基础语法

xml开发方式下AutowiredAnnotationBeanPostProcessor的注册时机

Why should we build an enterprise fixed asset management system and how can enterprises strengthen fixed asset management

Develop fixed asset management system, what voice is used to develop fixed asset management system
随机推荐
使用xml文件打印mybaties-log插件的方式
《MongoDB入门教程》第03篇 MongoDB基本概念
数字滚动带动画
Reading notes of "the way to clean structure" (Part 2)
AcWing 1127. 香甜的黄油 题解(最短路—spfa)
Chic Lang: completely solve the problem of markdown pictures - no need to upload pictures - no need to network - there is no lack of pictures forwarded to others
metric_ Logger urination
《架构整洁之道》读书笔记(下)
搭建哨兵模式reids、redis从节点脱离哨兵集群
Typescript 之 快速入门
Data dimensionality reduction factor analysis
AcWing 343. Sorting problem solution (Floyd property realizes transitive closure)
电脑使用哪个录制视频软件比较好
PHP parser badminton reservation applet development requires online system
MySQL高级(进阶)SQL语句
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线(indifference curve)
AcWing 1131. 拯救大兵瑞恩 题解(最短路)
Npoi export Excel2007
AcWing 343. 排序 题解(floyd性质实现传递闭包)
Microservice technology - distributed global ID in high concurrency