You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Waypoints can be used at three granularities: namespace, service and pod. Also you could install multiple waypoints with different granularities under the same namespace.
69
+
Waypoints can be used at three granularity: namespace, service and pod. And you could also install multiple waypoints at different granularity within a namespace.
70
+
Below we will learn how to deploy different waypoints for different granularity. We can use `kmeshctl waypoint` subcommands to generate or apply waypoint.
70
71
71
-
#### Install waypoint in service granularity:
72
+
To enable a namespace, service or pod to use a waypoint, add the `istio.io/use-waypoint` label with a value of the waypoint name.
73
+
We can also specify a customized waypoint image with `--image`, by default this default to `ghcr.io/kmesh-net/waypoint:{VERSION}`
72
74
73
-
Deploy a waypoint for service `reviews`, so any traffic to that service will be mediated by that waypoint proxy
75
+
#### Configure a waypoint for a specific service:
74
76
75
-
***NOTE: There are breaking changes in waypoint capture mode between istio 1.22 and istio 1.21, so the following commands need to be run on at least istio 1.22.***
77
+
Deploy a waypoint `reviews-svc-waypoint` for service `reviews`, so any traffic to `reviews` from a client managed by Kmesh will be mediated by the waypoint proxy
76
78
77
79
```bash
78
-
[root@ ~]# istioctl x waypoint apply -n default --name reviews-svc-waypoint
79
-
```
80
-
81
-
Label the `reviews` service to use the `reviews-svc-waypoint` waypoint:
80
+
[root@ ~]# kmeshctl waypoint apply --for service -n default --name=reviews-svc-waypoint
82
81
83
-
```bash
84
-
[root@ ~]# kubectl label service reviews istio.io/use-waypoint=reviews-svc-waypoint
82
+
waypoint default/reviews-svc-waypoint applied
85
83
```
86
84
87
-
You can use `kubectl get pods`to see all the pods except waypoint are ready. **Then replace the waypoint image with the Kmesh customized image.** Based on istio-proxy, Kmesh adds an customized listener filter called [Kmesh_tlv](https://github.com/kmesh-net/waypoint/tree/master/source/extensions/filters/listener/kmesh_tlv), which will parse the custom TLV protocol encoded by Kmesh and obtain the target address and metadata to connect L4 and L7.
85
+
Label the `reviews` service to use `reviews-svc-waypoint` waypoint:
88
86
89
87
```bash
90
-
[root@ ~]# kubectl get gateways.gateway.networking.k8s.io
***NOTE: Also need to replace the original image of waypoint with the Kmesh customized image.***
111
+
Deploy a waypoint for the `default` namespace with default name `waypoint`. By specifying `--enroll-namespace`, the namespace will be labeled with `istio.io/use-waypoint=waypoint`
namespace default labels with "istio.io/use-waypoint: waypoint"
131
117
```
132
118
133
-
Then any requests from any pods using the Kmesh, to any service running in `default` namespace, will be routed through that waypoint for L7 processing and policy enforcement.
119
+
#### Configure waypoint for a specific pod:
120
+
121
+
Deploy a waypoint called reviews-v2-pod-waypoint for the `reviews-v2-5979c6fc9c-72bst` pod.
Now any requests from pods in the Kmesh to the `reviews-v2` pod IP will be routed through `reviews-v2-pod-waypoint` waypoint for L7 processing and policy enforcement.
152
133
153
134
### Cleanup
@@ -156,22 +137,22 @@ If you are **not** planning to explore any follow-on tasks, go on with the clean
156
137
157
138
1. Remove waypoint:
158
139
159
-
#### Remove waypoint in service granularity
140
+
#### Remove waypoint for service
160
141
```bash
161
-
[root@ ~]#istioctl x waypoint delete reviews-svc-waypoint
0 commit comments