From 4a74b5ea12bddd377b487509cae7fac9978a384a Mon Sep 17 00:00:00 2001 From: Huabing Zhao Date: Sat, 18 Jan 2025 03:31:06 +0000 Subject: [PATCH] update README Signed-off-by: Huabing Zhao --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 5b311d8..cddff92 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,13 @@ curl $GATEWAY_HOST \ │ │ │ │ kubectl apply -f manifests ``` +Wait for the pods to be ready: + +```bash +kubectl wait --for=condition=Available --timeout=5m -n envoy-gateway-system \ + deployment -l gateway.envoyproxy.io/owning-gateway-name=ext-auth-poc +``` + 3. Test the POC: Run the following commands to test the POC: Get the Gateway address: @@ -70,6 +77,14 @@ Get the Gateway address: export GATEWAY_HOST=$(kubectl get gateway/ext-auth-poc -o jsonpath='{.status.addresses[0].value}') ``` +You can also port-forward the Gateway to localhost if load balancer is not available: + +```bash +export ENVOY_SERVICE=$(kubectl get svc -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-name=ext-auth-poc -o jsonpath='{.items[0].metadata.name}') +kubectl -n envoy-gateway-system port-forward service/${ENVOY_SERVICE} 8080:80 & +export GATEWAY_HOST=127.0.0.1:8080 +``` + Curl the Gateway with the authorization header "Bearer token1", which is the bearer token for user1: ```bash