Skip to content

Commit 004e202

Browse files
modified how it works with missing commands (#54)
1 parent 285f57a commit 004e202

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

docs/how-it-works.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Run through them again for a second cluster to use with the extended example sho
2727

2828
1. You can use an existing EKS cluster or create a new one as shown here:
2929
```bash
30-
eksctl create cluster name <my-cluster> region us-west-2
30+
eksctl create cluster --name <my-cluster> --region us-west-2
3131
```
3232
1. Configure security group: To receive traffic from the VPC Lattice fleet, you must set up security groups so that they allow all Pods communicating with VPC Lattice to allow traffic on all ports from the 169.254.171.0/24 address range. See [Control traffic to resources using security groups](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) for details.
3333

@@ -62,7 +62,7 @@ Run through them again for a second cluster to use with the extended example sho
6262
```
6363
1. Create the `system` namespace:
6464
```bash
65-
kubectl apply -f examples/deploy_namespace.yaml
65+
kubectl apply -f examples/deploy-namesystem.yaml
6666
```
6767

6868
1. Create an iamserviceaccount for pod level permission:
@@ -82,6 +82,11 @@ Run through them again for a second cluster to use with the extended example sho
8282
kubectl apply -f examples/deploy-v0.0.1.yaml
8383
```
8484

85+
1. Create the amazon-vpc-lattice GatewayClass:
86+
```bash
87+
kubectl apply -f examples/gatewayclass.yaml
88+
```
89+
8590
## Using the AWS Gateway API Controller
8691

8792
The first part of this section provides an example of setting up of service-to-service communications on a single cluster.
@@ -140,27 +145,27 @@ This example creates a single cluster in a single VPC, then configures two route
140145
kubectl get httproute
141146
```
142147
```
143-
NAME HOSTNAMES AGE
144-
httpbin 5h9m
145-
parking 17h
148+
NAME HOSTNAMES AGE
149+
inventory 51s
150+
rates 6m11s
146151
```
147152
1. List the route’s yaml file to see the DNS address (highlighted here on the `message` line):
148153
```bash
149-
kubectl get httproute parking -o yaml
154+
kubectl get httproute inventory -o yaml
150155
```
151156
<pre>
152157
apiVersion: gateway.networking.k8s.io/v1alpha2
153158
kind: HTTPRoute
154159
metadata:
155160
annotations:
156161
kubectl.kubernetes.io/last-applied-configuration: |
157-
{"apiVersion":"gateway.networking.k8s.io/v1alpha2","kind":"HTTPRoute","metadata":{"annotations":{},"name":"parking","namespace":"default"}... }}]}]}}
162+
{"apiVersion":"gateway.networking.k8s.io/v1alpha2","kind":"HTTPRoute","metadata":{"annotations":{},"name":"inventory","namespace":"default"}... }}]}]}}
158163
...
159164
status:
160165
parents:
161166
- conditions:
162167
- lastTransitionTime: "2022-11-22T02:29:22Z"
163-
message: 'DNS Name: <b><i>parking-default-0f326944c3d681c0d.7d67968.vpc-lattice-svcs.us-west-2.on.aws</i></b>'
168+
message: 'DNS Name: <b><i>inventory-default-0f326944c3d681c0d.7d67968.vpc-lattice-svcs.us-west-2.on.aws</i></b>'
164169
reason: Reconciled
165170
status: "True"
166171
type: httproute
@@ -171,6 +176,10 @@ This example creates a single cluster in a single VPC, then configures two route
171176
name: my-hotel
172177
...
173178
</pre>
179+
180+
```bash
181+
kubectl get rates inventory -o yaml
182+
```
174183

175184
**Check service connectivity**
176185

@@ -274,10 +283,20 @@ The following figure illustrates this:
274283
Requesting to Pod(inventory-ver1-7bb6989d9d-2p2hk): inventory-ver1 handler pod <----> in 1st cluster
275284
```
276285
```bash
277-
curl inventory-0cd1a223d518754f3.7d67968.vpc-service-network-svcs.us-west-2.amazonaws.com
286+
for ((i=1;i<=30;i++)); do curl "inventory-default-0f89d8ff5e98400d0.7d67968.vpc-lattice-svcs.us-west-2.on.aws"; done
278287
```
279288
```
280-
Requesting to Pod(inventory-ver2-7bb6989d9d-2p2hk): inventory-ver2 handler pod <----> in 2nd cluster
289+
Requsting to Pod(inventory-ver1-74fc59977-wg8br): Inventory-ver1 handler pod
290+
Requsting to Pod(inventory-ver2-6dc74b45d8-rlnlt): Inventory-ver2 handler pod <----> in 2nd cluster
291+
Requsting to Pod(inventory-ver2-6dc74b45d8-rlnlt): Inventory-ver2 handler pod
292+
Requsting to Pod(inventory-ver2-6dc74b45d8-rlnlt): Inventory-ver2 handler pod
293+
Requsting to Pod(inventory-ver2-6dc74b45d8-rlnlt): Inventory-ver2 handler pod
294+
Requsting to Pod(inventory-ver2-6dc74b45d8-95rsr): Inventory-ver1 handler pod <----> in 1st cluster
295+
Requsting to Pod(inventory-ver2-6dc74b45d8-rlnlt): Inventory-ver2 handler pod
296+
Requsting to Pod(inventory-ver2-6dc74b45d8-95rsr): Inventory-ver2 handler pod
297+
Requsting to Pod(inventory-ver2-6dc74b45d8-95rsr): Inventory-ver2 handler pod
298+
Requsting to Pod(inventory-ver1-74fc59977-wg8br): Inventory-ver1 handler pod....
299+
281300
```
282301
## Understanding the Gateway API Controller
283302

0 commit comments

Comments
 (0)