Skip to content

Commit

Permalink
Merge pull request #97 from Kuromesi/kuromesi/deploy-in-asm
Browse files Browse the repository at this point in the history
add waypoint for deploy in asm tutorial
  • Loading branch information
kmesh-bot authored Dec 16, 2024
2 parents a6487ec + 3506d3c commit ec7e736
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
38 changes: 37 additions & 1 deletion content/en/blog/deploy_kmesh_in_asm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors: [Kuromesi]
tags: [introduce]
categories: [General]
date: 2024-11-27T11:33:00+08:00
lastmod: 2024-11-27T11:33:00+08:00
lastmod: 2024-12-14T10:37:00+08:00
featured: false
draft: false

Expand Down Expand Up @@ -192,6 +192,42 @@ kubectl get virtualservices -o yaml
# resourceVersion: ""
```

### Deploy Waypoint for Fortio Service
You can deploy Waypoint to handle service-level layer 7 traffic by executing the following command in the default namespace.

```shell
kubectl apply -f - <<EOF
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
labels:
istio.io/waypoint-for: service
name: fortio-waypoint
namespace: default
spec:
gatewayClassName: istio-waypoint
listeners:
- name: mesh
port: 15008
protocol: HBONE
EOF
```

Run the following enable Waypoint for fortio service.

```shell
kubectl label service fortio istio.io/use-waypoint=fortio-waypoint
```

Run the following command to check the current Waypoint status.

```shell
kubectl get gateway.gateway.networking.k8s.io

# NAME CLASS ADDRESS PROGRAMMED AGE
# fortio-waypoint istio-waypoint 192.168.227.95 True 8m37s
```

### Start Test Traffic
You can start test traffic by executing the following command. You should see that only about 10% of the traffic is directed to version v2 of fortio.

Expand Down
38 changes: 37 additions & 1 deletion content/zh/blog/deploy_kmesh_in_asm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors: [Kuromesi]
tags: [introduce]
categories: [General]
date: 2024-11-27T11:33:00+08:00
lastmod: 2024-11-27T11:33:00+08:00
lastmod: 2024-12-14T10:37:00+08:00
featured: false
draft: false

Expand Down Expand Up @@ -192,6 +192,42 @@ kubectl get virtualservices -o yaml
# resourceVersion: ""
```

### 为服务部署 Waypoint
您可以通过执行以下命令,为 default 命名空间部署 Waypoint 用于代理 service 级别七层的访问流量。

```shell
kubectl apply -f - <<EOF
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
labels:
istio.io/waypoint-for: service
name: fortio-waypoint
namespace: default
spec:
gatewayClassName: istio-waypoint
listeners:
- name: mesh
port: 15008
protocol: HBONE
EOF
```

执行以下命令,为 fortio service 启用 Waypoint 代理。

```shell
kubectl label service fortio istio.io/use-waypoint=fortio-waypoint
```

执行以下命令,查看当前 Waypoint 状态。

```shell
kubectl get gateway.gateway.networking.k8s.io

# NAME CLASS ADDRESS PROGRAMMED AGE
# fortio-waypoint istio-waypoint 192.168.227.95 True 8m37s
```

### 发起测试流量
您可以通过执行以下命令发起测试流量,您应该可以看到,此时只有大约 10% 的流量流向 v2 版本的 fortio。

Expand Down

0 comments on commit ec7e736

Please sign in to comment.