Istio_1.17.8安装

项目背景

 按照istio官网的命令一路安装下来,安装好的istio版本为目前的最新版本,1.22.0。而我的k8s集群的版本并不支持istio_1.22的版本,导致ingress-gate网关安装不上,再仔细查看istio的发布文档,如果用istio_1.22版本,k8s的版本至少也得是1.27。与其升级k8s,我还是换掉istio的版本。

# istioctl version
client version: 1.22.0
control plane version: 1.22.0
data plane version: none# kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.4", GitCommit:"e6c093d87ea4cbb530a7b2ae91e54c0842d8308a", GitTreeState:"clean", BuildDate:"2022-02-16T12:38:05Z", GoVersion:"go1.17.7", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.4", GitCommit:"e6c093d87ea4cbb530a7b2ae91e54c0842d8308a", GitTreeState:"clean", BuildDate:"2022-02-16T12:32:02Z", GoVersion:"go1.17.7", Compiler:"gc", Platform:"linux/amd64"}

 1.安装istio_1.17.8

查看istio的支持版本,1.17.8是17版本最后一次更新,也正好适配我目前的k8s版本。

1.1下载地址

Release Istio 1.17.8 · istio/istio · GitHub

 1.2上传并解压

# ll
-rw-r--r-- 1 root root 27127663 Jun  5 16:25 istio-1.17.8-linux-amd64.tar.gz

1.3 新增环境变量

# cat /etc/profile
...
export PATH=/usr/local/openssh-8.5p1/sbin:/usr/local/openssh-8.5p1/bin:$PATH
export KUBECONFIG=/etc/kubernetes/admin.conf
export PATH=/home/root/k8s/istio_test/install/istio-1.17.8/bin/:$PATH
#export PATH=/home/root/k8s/istio_test/install/istio-1.22.0/bin:$PATH

 source /etc/profile

# istioctl version
client version: 1.17.8
control plane version: 1.22.0
data plane version: 0

1.4 install

# istioctl install --set profile=demo -y
WARNING: Istio control planes installed: 1.22.0.
WARNING: An older installed version of Istio has been detected. Running this command will overwrite it.
✔ Istio core installed                                                                                                                                           
- Processing resources for Istiod. Waiting for Deployment/istio-system/istiod                                                                                    ^C
[foot@host-10-19-83-151 istio-1.17.8]$ istioctl install --set profile=demo -y -n bookinfo
WARNING: Istio control planes installed: 1.22.0.
WARNING: An older installed version of Istio has been detected. Running this command will overwrite it.
✔ Istio core installed                                                                                                                                           
✔ Istiod installed                                                                                                                                               
- Processing resources for Egress gateways, Ingress gateways. Waiting for Deployment/istio-system/istio-egressgateway, Deployment/istio-system/istio-ingressga...
✔ Egress gateways installed                                                                                                                                      
✔ Ingress gateways installed                                                                                                                                     
✔ Installation complete                                                                                                                                          Making this installation the default for injection and validation.Thank you for installing Istio 1.17.  Please take a few minutes to tell us about your install/upgrade experience!  https://forms.gle/hMHGiwZHPU7UQRWe9

查看pod情况

# kubectl get po -A
NAMESPACE              NAME                                         READY   STATUS    RESTARTS      AGE
ingress-nginx          nginx-deployment-64d5f7665c-56cpz            1/1     Running   0             22d
ingress-nginx          nginx-ingress-controller-7cfc988f46-cszsd    1/1     Running   0             22d
istio-system           istio-egressgateway-85df6b84b7-hjlbx         1/1     Running   0             92s
istio-system           istio-ingressgateway-6bb8fb6549-wcgqq        1/1     Running   0             92s
istio-system           istiod-8d74787f-bckft                        1/1     Running   0             2m37s

 

再次查看版本

# istioctl version
client version: 1.17.8
control plane version: 1.17.8
data plane version: 1.17.8 (2 proxies)

 2.部署demo

2.1.1 准备

给这些示例服务创建一个命名空间。

kubectl create namespace bookinfo

给命名空间添加 Istio 的标签,指示 Istio 在部署应用(只对 Pod 起效)的时候,自动注入 Envoy Sidecar Proxy 容器:

kubectl label namespace bookinfo istio-injection=enabled

开启让 Istio 注入 Sidecar 有很多种方式,其中一种是给命名空间设置下标签,在此命名空间下部署的 Pod,会被自动注入 Sidecar 。

demo是官方提供的demo,bookinfo

文件位置:https://github.com/whuanle/istio_book/tree/main/3。

仓库拉取后打开 3 目录,执行命令进行部署:

# ll
total 68
-rw-rw-r-- 1 root root 598 Jun  5 15:14 details_deploy.yaml
-rw-rw-r-- 1 root root 108 Jun  5 15:14 details_sa.yaml
-rw-rw-r-- 1 root root 190 Jun  5 15:14 details_svc.yaml
-rw-rw-r-- 1 root root 278 Jun  5 15:14 ingress_gateway.yaml
-rw-rw-r-- 1 root root 754 Jun  5 15:14 productpage_deploy.yaml
-rw-rw-r-- 1 root root 116 Jun  5 15:14 productpage_sa.yaml
-rw-rw-r-- 1 root root 206 Jun  5 15:14 productpage_svc.yaml
-rw-rw-r-- 1 root root 227 Jun  5 15:14 productpage_tmpsvc.yaml
-rw-rw-r-- 1 root root 466 Jun  5 15:14 productpage_vs.yaml
-rw-rw-r-- 1 root root 598 Jun  5 15:14 ratings_deploy.yaml
-rw-rw-r-- 1 root root 108 Jun  5 15:14 ratings_sa.yaml
-rw-rw-r-- 1 root root 190 Jun  5 15:14 ratings_svc.yaml
-rw-rw-r-- 1 root root 108 Jun  5 15:14 reviews_sa.yaml
-rw-rw-r-- 1 root root 190 Jun  5 15:14 reviews_svc.yaml
-rw-rw-r-- 1 root root 913 Jun  5 15:14 reviews_v1_deploy.yaml
-rw-rw-r-- 1 root root 913 Jun  5 15:14 reviews_v2_deploy.yaml
-rw-rw-r-- 1 root root 913 Jun  5 15:14 reviews_v3_deploy.yaml

既然不能一次都执行了,那就一个一个yaml命令执行吧。

2.1.2 detail

Detail:存储了书籍信息的应用。

1.使用 Deployment 部署 details 应用。

2.为 details 服务配置 Kubernetes Service 。

3.为 details 服务创建一个 ServiceAccount。

$ kubectl apply -f *.yaml
error: Unexpected args: [details_sa.yaml details_svc.yaml ingress_gateway.yaml productpage_deploy.yaml productpage_sa.yaml productpage_svc.yaml productpage_tmpsvc.yaml productpage_vs.yaml ratings_deploy.yaml ratings_sa.yaml ratings_svc.yaml reviews_sa.yaml reviews_svc.yaml reviews_v1_deploy.yaml reviews_v2_deploy.yaml reviews_v3_deploy.yaml]
See 'kubectl apply -h' for help and examples# kubectl apply -f details_*.yaml
error: Unexpected args: [details_sa.yaml details_svc.yaml]
See 'kubectl apply -h' for help and examples# kubectl apply -f details_deploy.yaml -n bookinfo
deployment.apps/details-v1 created
# kubectl apply -f details_sa.yaml  -n bookinfo
serviceaccount/bookinfo-details created
# kubectl apply -f details_svc.yaml -n bookinfo
service/details created# kubectl get po  -n bookinfo
NAME                          READY   STATUS    RESTARTS   AGE
details-v1-698b5d8c98-bnd52   1/1     Running   0          2m27s

2.1.3 ratings

提供每条评论的打星数据。

# kubectl apply -f ratings_deploy.yaml -n bookinfo
deployment.apps/ratings-v1 created
# kubectl apply -f ratings_svc.yaml -n bookinfo
service/ratings created
#kubectl apply -f ratings_sa.yaml -n bookinfo
serviceaccount/bookinfo-ratings created# kubectl get po  -n bookinfo
NAME                          READY   STATUS    RESTARTS   AGE
details-v1-698b5d8c98-bnd52   1/1     Running   0          13m
ratings-v1-5967f59c58-st7xr   1/1     Running   0          4m48s

 2.1.4 review

提供书籍的评论信息

# kubectl apply -f reviews_svc.yaml -n bookinfo
service/reviews created
# kubectl apply -f reviews_sa.yaml -n bookinfo
serviceaccount/bookinfo-reviews unchanged
# kubectl apply -f reviews_v1_deploy.yaml -n bookinfo
deployment.apps/reviews-v1 created
[foot@host-10-19-83-151 3]$ kubectl apply -f reviews_v2_deploy.yaml -n bookinfo
deployment.apps/reviews-v2 created
[foot@host-10-19-83-151 3]$ kubectl apply -f reviews_v3_deploy.yaml -n bookinfo
deployment.apps/reviews-v3 created# kubectl get po  -n bookinfo
NAME                          READY   STATUS    RESTARTS   AGE
details-v1-698b5d8c98-bnd52   1/1     Running   0          22m
ratings-v1-5967f59c58-st7xr   1/1     Running   0          13m
reviews-v1-9c6bb6658-dc5s9    1/1     Running   0          6m15s
reviews-v2-8454bb78d8-fghsh   1/1     Running   0          6m8s
reviews-v3-6dc9897554-zpdl2   1/1     Running   0          6m3s

2.1.5  productpage

页面

# kubectl apply -f productpage_deploy.yaml -n bookinfo
deployment.apps/productpage-v1 created
# kubectl apply -f productpage_svc.yaml -n bookinfo
service/productpage created
# kubectl apply -f productpage_sa.yaml  -n bookinfo
serviceaccount/bookinfo-productpage created# kubectl get po  -n bookinfo
NAME                             READY   STATUS    RESTARTS   AGE
details-v1-698b5d8c98-bnd52      1/1     Running   0          23m
productpage-v1-bf4b489d8-z9wxp   1/1     Running   0          46s
ratings-v1-5967f59c58-st7xr      1/1     Running   0          15m
reviews-v1-9c6bb6658-dc5s9       1/1     Running   0          7m56s
reviews-v2-8454bb78d8-fghsh      1/1     Running   0          7m49s
reviews-v3-6dc9897554-zpdl2      1/1     Running   0          7m44s

聚合服务,供用户浏览书籍信息。

2.1.6 检查

2.6.1 get all

# kubectl get all -n bookinfo
NAME                                 READY   STATUS    RESTARTS   AGE
pod/details-v1-698b5d8c98-bnd52      1/1     Running   0          25m
pod/productpage-v1-bf4b489d8-z9wxp   1/1     Running   0          2m4s
pod/ratings-v1-5967f59c58-st7xr      1/1     Running   0          16m
pod/reviews-v1-9c6bb6658-dc5s9       1/1     Running   0          9m14s
pod/reviews-v2-8454bb78d8-fghsh      1/1     Running   0          9m7s
pod/reviews-v3-6dc9897554-zpdl2      1/1     Running   0          9m2sNAME                  TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/details       ClusterIP   10.102.62.72     <none>        9080/TCP   24m
service/productpage   ClusterIP   10.96.210.213    <none>        9080/TCP   117s
service/ratings       ClusterIP   10.103.80.45     <none>        9080/TCP   16m
service/reviews       ClusterIP   10.102.163.207   <none>        9080/TCP   9m40sNAME                             READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/details-v1       1/1     1            1           25m
deployment.apps/productpage-v1   1/1     1            1           2m5s
deployment.apps/ratings-v1       1/1     1            1           16m
deployment.apps/reviews-v1       1/1     1            1           9m14s
deployment.apps/reviews-v2       1/1     1            1           9m7s
deployment.apps/reviews-v3       1/1     1            1           9m2sNAME                                       DESIRED   CURRENT   READY   AGE
replicaset.apps/details-v1-698b5d8c98      1         1         1       25m
replicaset.apps/productpage-v1-bf4b489d8   1         1         1       2m5s
replicaset.apps/ratings-v1-5967f59c58      1         1         1       16m
replicaset.apps/reviews-v1-9c6bb6658       1         1         1       9m14s
replicaset.apps/reviews-v2-8454bb78d8      1         1         1       9m7s
replicaset.apps/reviews-v3-6dc9897554      1         1         1       9m2s

2.1.6.2 curl productpage

$ curl 10.96.210.213:9080
<!DOCTYPE html>
<html><head><title>Simple Bookstore App</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"><!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css"><!-- Optional theme -->
<link rel="stylesheet" href="static/bootstrap/css/bootstrap-theme.min.css"></head><body><p><h3>Hello! This is a simple bookstore application consisting of three services as shown below</h3>
</p><table class="table table-condensed table-bordered table-hover"><tr><th>name</th><td>http://details:9080</td></tr><tr><th>endpoint</th><td>details</td></tr><tr><th>children</th><td><table class="table table-condensed table-bordered table-hover"><tr><th>name</th><th>endpoint</th><th>children</th></tr><tr><td>http://details:9080</td><td>details</td><td></td></tr><tr><td>http://reviews:9080</td><td>reviews</td><td><table class="table table-condensed table-bordered table-hover"><tr><th>name</th><th>endpoint</th><th>children</th></tr><tr><td>http://ratings:9080</td><td>ratings</td><td></td></tr></table></td></tr></table></td></tr></table><p><h4>Click on one of the links below to auto generate a request to the backend as a real user or a tester</h4>
</p>
<p><a href="/productpage?u=normal">Normal user</a></p>
<p><a href="/productpage?u=test">Test user</a></p><!-- Latest compiled and minified JavaScript -->
<script src="static/jquery.min.js"></script><!-- Latest compiled and minified JavaScript -->
<script src="static/bootstrap/js/bootstrap.min.js"></script></body>
</html>

有这一串xml文件,就是部署成功了。放到浏览器中访问,无法访问。

2.1.7 临时访问

将ingress-gageway.yaml复制一份

# kubectl apply -f productpage_tmpsvc.yaml -n bookinfo
service/productpagetmp created
# kubectl get svc -n book
No resources found in book namespace.
# kubectl get svc -n bookinfo
NAME             TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
details          ClusterIP   10.102.62.72     <none>        9080/TCP         30m
productpage      ClusterIP   10.96.210.213    <none>        9080/TCP         7m14s
productpagetmp   NodePort    10.111.122.78    <none>        9080:31680/TCP   17s
ratings          ClusterIP   10.103.80.45     <none>        9080/TCP         21m
reviews          ClusterIP   10.102.163.207   <none>        9080/TCP         14m

页面中输入 虚拟机ip:31680

带上上下文访问

 

 

 一直刷新就行,会轮寻review的三个版本的pod

2.1.8 配置gateway

hosts 表示对外开放的访问路径,你可以绑定域名、IP 等。

这里使用 * ,表示所有访问都可以进入此网关。

# kubectl apply -f ingress_gateway.yaml  -n bookinfo
gateway.networking.istio.io/bookinfo-gateway created

模型来到这会

 2.1.9 部署VistualService

虽然创建了 Istio Gateway,但是我们还不能直接通过网关访问到前面部署的微服务,我们还需要创建 Istio VirtualService 将 Istio Gateway 跟对应的 Kubernetes Service 绑定起来,然后流量才能正式流向 Pod。

 流量实际并不会经过 Service 中,但是 VirtualService 需要通过 Service 来发现 Pod

# kubectl apply -f productpage_vs.yaml 
virtualservice.networking.istio.io/bookinfo created

2.1.10 检查,验证是否部署成功

有返回,则bookinfo应用正常

# kubectl exec "$(kubectl get pod -l app=ratings -n bookinfo -o jsonpath='{.items[0].metadata.name}')" -n bookinfo -c ratings -- curl -S productpage:9080/productpage | grep -o "<title>.*</title>"% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed
100  5294  100  5294    0     0   4086      0  0:00:01  0:00:01 --:--:--  4088
<title>Simple Bookstore App</title>

3.对外开放应用程序

3.1 创建istio入站ingress Gateway

不设置namespace时,ingressGageway将运行在默认default命名空间中。添加方式如下,新增namespace属性。

cat bookinfo-gateway.yaml 
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:name: bookinfo-gatewaynamespace: bookinfo
spec:selector:istio: ingressgateway # use istio default controllerservers:- port:number: 80name: httpprotocol: HTTPhosts:- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:name: bookinfonamespace: bookinfo
spec:hosts:- "*"gateways:- bookinfo-gatewayhttp:- match:- uri:exact: /productpage- uri:prefix: /static- uri:exact: /login- uri:exact: /logout- uri:prefix: /api/v1/productsroute:- destination:host: productpageport:number: 9080

3.2 运行安装ingress Gateway 

# kubectl apply -f bookinfo-gateway.yaml 
gateway.networking.istio.io/bookinfo-gateway created
virtualservice.networking.istio.io/bookinfo created# istioctl analyze
Info [IST0102] (Namespace default) The namespace is not enabled for Istio injection. Run 'kubectl label namespace default istio-injection=enabled' to enable it, or 'kubectl label namespace default istio-injection=disabled' to explicitly mark it as not needing injection.# kubectl label namespace default istio-injection=disabled
namespace/default labeled# kubectl apply -f bookinfo-gateway.yaml 
gateway.networking.istio.io/bookinfo-gateway unchanged
virtualservice.networking.istio.io/bookinfo unchanged# istioctl analyze✔ No validation issues found when analyzing namespace: default.

3.3 确定入站IP

# kubectl get svc  istio-ingressgateway -n istio-system
NAME                   TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                                                                      AGE
istio-ingressgateway   LoadBalancer   10.104.41.124   <pending>     15021:32515/TCP,80:31183/TCP,443:32582/TCP,31400:30302/TCP,15443:32277/TCP   41h
[foot@host-10-19-83-151 networking]$ 

设置 EXTERNAL-IP 的值之后, 您的环境就有了一个外部的负载均衡器,可以将其用作入站网关。 但如果 EXTERNAL-IP 的值为 <none> (或者一直是 <pending> 状态), 则您的环境则没有提供可作为入站流量网关的外部负载均衡器。 在这个情况下,您还可以用服务(Service)的节点端口访问网关。

如何配置自己的外部负载均衡器,参考

https://www.cnblogs.com/yinzhengjie/p/17811466.htmlicon-default.png?t=N7T8https://www.cnblogs.com/yinzhengjie/p/17811466.html环境中,没有找到外部负载均衡器,就选择一个节点来代替

# export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
# echo $INGRESS_PORT
31183# export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
# echo $SECURE_INGRESS_PORT
32582# export INGRESS_HOST=$(kubectl get po -l istio=ingressgateway -n istio-system -o jsonpath='{.items[0].status.hostIP}')# echo $INGRESS_HOST
xx.xx.xx.xx# export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
# echo $GATEWAY_URL
xx.xx.xx.xx:31183

3.4 外部验证

4 查看仪表盘

Istio 和几个遥测应用做了集成。 遥测能帮您了解服务网格的结构、展示网络的拓扑结构、分析网格的健康状态

4.1 Kiali及其插件

4.1.1 安装Kiali

# kubectl apply -f addons/
serviceaccount/grafana created
configmap/grafana created
service/grafana created
deployment.apps/grafana created
configmap/istio-grafana-dashboards created
configmap/istio-services-grafana-dashboards created
deployment.apps/jaeger created
service/tracing created
service/zipkin created
service/jaeger-collector created
serviceaccount/kiali created
configmap/kiali created
clusterrole.rbac.authorization.k8s.io/kiali-viewer created
clusterrole.rbac.authorization.k8s.io/kiali created
clusterrolebinding.rbac.authorization.k8s.io/kiali created
role.rbac.authorization.k8s.io/kiali-controlplane created
rolebinding.rbac.authorization.k8s.io/kiali-controlplane created
service/kiali created
deployment.apps/kiali created
serviceaccount/prometheus created
configmap/prometheus created
clusterrole.rbac.authorization.k8s.io/prometheus created
clusterrolebinding.rbac.authorization.k8s.io/prometheus created
service/prometheus created
deployment.apps/prometheus created

使用 kubectl rollout status 命令可以检查部署的滚动更新进度,直到部署完成或超时。

如果部署正在进行滚动更新,该命令将会显示更新的进度情况,直到更新完成或超时。如果部署已经完成更新,命令将会输出 "deployment "kiali" successfully rolled out"。

请注意,这个命令只适用于使用 Deployment 进行部署管理的场景。如果你在其它类型的控制器上进行了部署(例如 StatefulSet),则需要使用相应的命令来检查滚动更新状态。

# kubectl rollout status deployment/kiali -n istio-system
deployment "kiali" successfully rolled out

 4.1.2 修改kiali配置NodePort

# kubectl get svc -n istio-system
NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                      AGE
grafana                ClusterIP      10.102.208.36    <none>        3000/TCP                                                                     179m
istio-egressgateway    ClusterIP      10.100.225.194   <none>        80/TCP,443/TCP                                                               2d
istio-ingressgateway   LoadBalancer   10.104.41.124    <pending>     15021:32515/TCP,80:31183/TCP,443:32582/TCP,31400:30302/TCP,15443:32277/TCP   2d
istiod                 ClusterIP      10.104.226.207   <none>        15010/TCP,15012/TCP,443/TCP,15014/TCP                                        3d7h
jaeger-collector       ClusterIP      10.96.191.105    <none>        14268/TCP,14250/TCP,9411/TCP                                                 179m
kiali                  ClusterIP      10.98.246.20     <none>        20001/TCP,9090/TCP                                                           179m
prometheus             ClusterIP      10.110.173.109   <none>        9090/TCP                                                                     179m
tracing                ClusterIP      10.106.222.123   <none>        80/TCP,16685/TCP                                                             179m
zipkin                 ClusterIP      10.101.205.116   <none>        9411/TCP                                                                     179m

4.1.3 kubectl apply -f kiali.yaml

# kubectl apply -f kiali.yaml 
serviceaccount/kiali unchanged
configmap/kiali unchanged
clusterrole.rbac.authorization.k8s.io/kiali-viewer unchanged
clusterrole.rbac.authorization.k8s.io/kiali unchanged
clusterrolebinding.rbac.authorization.k8s.io/kiali unchanged
role.rbac.authorization.k8s.io/kiali-controlplane unchanged
rolebinding.rbac.authorization.k8s.io/kiali-controlplane unchanged
service/kiali configured
deployment.apps/kiali unchanged# kubectl get svc -n istio-system
NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                      AGE
grafana                ClusterIP      10.102.208.36    <none>        3000/TCP                                                                     3h2m
istio-egressgateway    ClusterIP      10.100.225.194   <none>        80/TCP,443/TCP                                                               2d
istio-ingressgateway   LoadBalancer   10.104.41.124    <pending>     15021:32515/TCP,80:31183/TCP,443:32582/TCP,31400:30302/TCP,15443:32277/TCP   2d
istiod                 ClusterIP      10.104.226.207   <none>        15010/TCP,15012/TCP,443/TCP,15014/TCP                                        3d7h
jaeger-collector       ClusterIP      10.96.191.105    <none>        14268/TCP,14250/TCP,9411/TCP                                                 3h2m
kiali                  NodePort       10.98.246.20     <none>        20001:30853/TCP,9090:32008/TCP                                               3h2m
prometheus             ClusterIP      10.110.173.109   <none>        9090/TCP                                                                     3h2m
tracing                ClusterIP      10.106.222.123   <none>        80/TCP,16685/TCP                                                             3h2m
zipkin                 ClusterIP      10.101.205.116   <none>        9411/TCP             

4.1.4 访问kiali页面

4.1.5 造数据

要查看追踪数据,必须向服务发送请求。请求的数量取决于 Istio 的采样率。 采样率在安装 Istio 时设置,默认采样速率为 1%。在第一个跟踪可见之前,您需要发送至少 100 个请求。 使用以下命令向 productpage 服务发送 100 个请求:

for i in `seq 1 100`; do curl -s -o /dev/null http://$GATEWAY_URL/productpage; done

for i in `seq 1 100`; do curl -s -o /dev/null http://10.19.83.151:31183/productpage; done

4.1.6 访问kiali页面

5.卸载 

删除 Bookinfo 示例应用和配置, 参阅清理 Bookinfo。

Istio 卸载程序按照层次结构逐级的从 istio-system 命令空间中删除 RBAC 权限和所有资源。对于不存在的资源报错,可以安全的忽略掉,毕竟它们已经被分层地删除了。

 

$ kubectl delete -f samples/addons $ istioctl uninstall -y --purge

命名空间 istio-system 默认情况下并不会被移除。 不需要的时候,使用下面命令移除它:

 

$ kubectl delete namespace istio-system

指示 Istio 自动注入 Envoy 边车代理的标签默认也不移除。 不需要的时候,使用下面命令移除它。

 

$ kubectl label namespace default istio-injection-

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/25134.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

学习分享-声明式的 HTTP 客户端OpenFeign

OpenFeign 详细介绍 最近在学习中有用到OpenFeign&#xff0c;也在网上查找了相关资料&#xff0c;做下分享。 一、概述 OpenFeign 是一个声明式的 HTTP 客户端&#xff0c;它使得调用 REST API 变得更加简单和直观。通过 OpenFeign&#xff0c;开发者只需定义接口并添加注解…

屏幕空间反射技术在AI绘画中的作用

在数字艺术和游戏开发的世界中&#xff0c;真实感渲染一直是追求的圣杯。屏幕空间反射&#xff08;Screen Space Reflection&#xff0c;SSR&#xff09;技术作为一种先进的图形处理手段&#xff0c;它通过在屏幕空间内模拟光线的反射来增强场景的真实感和视觉冲击力。随着人工…

【Docker系列】跨平台 Docker 镜像构建:深入理解`--platform`参数

&#x1f49d;&#x1f49d;&#x1f49d;欢迎来到我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…

如何知道ZIP压缩包解压密码?有哪些解密策略?

我们在生活当中&#xff0c;经常会遇到ZIP压缩包&#xff0c;它们以其高效的文件压缩和方便的传输特性而受到广泛欢迎。然而&#xff0c;有时我们可能会遇到一些带有密码保护的ZIP文件&#xff0c;这时就需要知道解压密码才能访问其中的内容。本文将探讨如何知道ZIP压缩包的解压…

Spring Boot整合Redis通过Zset数据类型+定时任务实现延迟队列

&#x1f604; 19年之后由于某些原因断更了三年&#xff0c;23年重新扬帆起航&#xff0c;推出更多优质博文&#xff0c;希望大家多多支持&#xff5e; &#x1f337; 古之立大事者&#xff0c;不惟有超世之才&#xff0c;亦必有坚忍不拔之志 &#x1f390; 个人CSND主页——Mi…

stm32最小系统焊接调试总结

stm32最小系统打板后,接下来开始焊接元器件,焊接元器件可以参考立创EDA焊接辅助工具。 图1 焊接辅助助手 焊接准备工具有,焊台,放大镜,元器件,镊子,焊锡膏,锡丝及万用表等。调节焊台温度到350-400摄氏度。焊接顺序是先焊接USB typec接口,5V电源,ldo,ch340,stm32芯片…

人工智能小作业

1.问题 将下列句子用一阶谓词形式表示&#xff1a; (1)雪是白的。 (2)数a和数b之和大于数c。 (3)201班的学生每人都有一台笔记本电脑。 2.答案 句子&#xff08;1&#xff09;“雪是白的”可以表示为&#xff1a; White(雪)。 句子&#xff08;2&#xff09;“数a和数b…

【代码审计】star7th/showdoc:v3.2.4 Phar反序列化写webshell

目录 漏洞速览 复现 漏洞速览 微步在线X情报社区-威胁情报查询_威胁分析平台_开放社区 主要就是两步&#xff0c;sql注入拿到用户token&#xff0c;再以用户身份上传恶意phar包打phar反序列化 因为文件上传对用户权限没有限制&#xff0c;故本文对sql注入部分不做探讨。…

C++中的封装,继承和多态

目录 摘要 封装&#xff08;Encapsulation&#xff09; 基础用法 继承&#xff08;Inheritance&#xff09; 基础用法 多态&#xff08;Polymorphism&#xff09; 1. 虚函数 2. 纯虚函数 总结 摘要 在C中&#xff0c;封装、继承和多态是面向对象编程的三大核心特性。…

机器学习--损失函数

损失函数&#xff08;Loss Function&#xff09;&#xff0c;也称为代价函数&#xff08;Cost Function&#xff09;或误差函数&#xff08;Error Function&#xff09;&#xff0c;是机器学习和统计学中的一个重要概念。它用于量化模型预测值与真实值之间的差异。损失函数的值…

怎么换自己手机的ip地址

在互联网时代&#xff0c;IP地址已经成为了我们数字身份的一部分。无论是浏览网页、下载文件还是进行在线交流&#xff0c;我们的IP地址都在默默发挥着作用。然而&#xff0c;有时出于安全或隐私保护的考虑&#xff0c;我们可能需要更换手机的IP地址。那么&#xff0c;如何轻松…

C语言——函数指针

一、函数指针的定义 函数指针是指向函数的指针变量&#xff0c;可以用来动态调用不同的函数。使用函数指针的一般步骤如下&#xff1a; 1、定义函数指针类型&#xff1a;typedef 返回值类型 (*指针变量名)(参数列表); 2、声明函数指针变量并赋值&#xff1a;指针变量名 函数…

深入理解Android多线程开发:场景应用与解决方案解析

前言 在专栏之前的文章中,我们了解了并发、线程、线程安全、线程池等多线程开发的概念。本篇文章,我们来梳理一下在Android开发中我们面临的多线程开发中常见的应用场景和解决方案。 应用场景 资源复用和优化 并发控制与线程池的使用 为了优化资源利用和提高应用性能,需要…

【Spring Boot实现网页会话(Session )】

文章目录 前言什么是网页会话&#xff08;Session&#xff09;Spring Boot 中的 Session 管理Session 的创建与管理Session 的数据存储使用示例 前言 会话管理允许服务器在多次HTTP请求之间保持用户的状态信息&#xff0c;以便用户可以进行认证、保持登录状态等操作。 什么是…

电商系统中热库和冷库的使用与数据转换

在现代电子商务系统中&#xff0c;数据的高效管理和存储是关键。电商平台每日处理海量数据&#xff0c;这些数据不仅包括用户行为、交易记录&#xff0c;还涵盖库存信息、商品详情、物流信息等。为了优化数据存储和查询效率&#xff0c;电商系统通常采用热库&#xff08;Hot St…

C#操作MySQL从入门到精通(14)——汇总数据

前言 我们有时候需要对数据库查询的值进行一些处理,比如求平均值等操作,本文就是详细讲解这些用法,本文测试使用的数据库数据如下: 1、求平均值 求所有student_age 列的平均值 string sql = string.Empty; if (radioButton_AVG.Checked) {sql = “select AVG( student_…

Day47 代码随想录打卡|二叉树篇---最大二叉树

题目&#xff08;leecode T654&#xff09;&#xff1a; 给定一个不重复的整数数组 nums 。 最大二叉树 可以用下面的算法从 nums 递归地构建: 创建一个根节点&#xff0c;其值为 nums 中的最大值。递归地在最大值 左边 的 子数组前缀上 构建左子树。递归地在最大值 右边 的 …

htb-linux-9-sense

nmap web渗透 目录爆破 靶机非常慢 system-users.txt ####Support ticket###Please create the following userusername: Rohit password: company defaults尝试登陆 现在我们知道了一个登陆的用户名&#xff0c;密码据称是公司默认密码。谷歌这个公司名称是pfsense现在用r…

web前端标书:深入剖析与精准构建

web前端标书&#xff1a;深入剖析与精准构建 在数字化浪潮席卷全球的今天&#xff0c;web前端技术作为连接用户与数字世界的桥梁&#xff0c;其重要性日益凸显。一份高质量的web前端标书&#xff0c;不仅是项目成功的关键&#xff0c;更是展现团队实力和专业素养的重要载体。本…

vue3如何定义一个组件

在 Vue 3 中&#xff0c;定义一个可以接收参数的组件通常是通过在组件的 props 选项中定义这些参数来完成的。当你使用组件时&#xff0c;你可以通过传递属性值来设置这些参数。 以下是定义可以接收参数的组件的步骤&#xff1a; 使用 <script> 而不是 <script setup&…