Skip to content

CP/DP Split: Update documentation on accessing nginx container #3338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/developer/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ Follow the steps below for manual testing:
- Logs of the `nginx-gateway` container. Look out for unexpected error logs or panics.

```shell
kubectl logs -n nginx-gateway -l app=nginx-gateway
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx-gateway
```

- Logs of the `nginx` container. Look for unexpected error logs and verify the access logs are correct.

```shell
kubectl logs -n nginx-gateway -l app=nginx
kubectl -n <nginx-pod-namespace> logs <nginx-pod-name> -c nginx
```

- The generated nginx config. Make sure it's correct.

```shell
kubectl exec -it -n nginx-gateway <nginx gateway pod> -c nginx -- nginx -T
kubectl exec -it -n <nginx-pod-namespace> <nginx-pod-name> -c nginx -- nginx -T
```

- The statuses of the Gateway API Resources. Make sure they look correct.
Expand Down
21 changes: 9 additions & 12 deletions examples/cafe-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ to route traffic to that application using HTTPRoute resources.

1. Follow the [installation instructions](https://docs.nginx.com/nginx-gateway-fabric/installation/) to deploy NGINX Gateway Fabric.

1. Save the public IP address of NGINX Gateway Fabric into a shell variable:

```text
GW_IP=XXX.YYY.ZZZ.III
```

1. Save the port of NGINX Gateway Fabric:

```text
GW_PORT=<port number>
```

## 2. Deploy the Cafe Application

1. Create the coffee and the tea Deployments and Services:
Expand Down Expand Up @@ -49,6 +37,15 @@ to route traffic to that application using HTTPRoute resources.
kubectl apply -f gateway.yaml
```

After creating the Gateway resource, NGINX Gateway Fabric will provision an NGINX Pod and Service fronting it to route traffic.

Save the public IP address and port of the NGINX Service into shell variables:

```text
GW_IP=XXX.YYY.ZZZ.III
GW_PORT=<port number>
```

1. Create the HTTPRoute resources:

```shell
Expand Down
21 changes: 9 additions & 12 deletions examples/cross-namespace-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ in a different namespace from our HTTPRoutes.

1. Follow the [installation instructions](https://docs.nginx.com/nginx-gateway-fabric/installation/) to deploy NGINX Gateway Fabric.

1. Save the public IP address of NGINX Gateway Fabric into a shell variable:

```text
GW_IP=XXX.YYY.ZZZ.III
```

1. Save the port of NGINX Gateway Fabric:

```text
GW_PORT=<port number>
```

## 2. Deploy the Cafe Application

1. Create the cafe namespace and cafe application:
Expand Down Expand Up @@ -49,6 +37,15 @@ in a different namespace from our HTTPRoutes.
kubectl apply -f gateway.yaml
```

After creating the Gateway resource, NGINX Gateway Fabric will provision an NGINX Pod and Service fronting it to route traffic.

Save the public IP address and port of the NGINX Service into shell variables:

```text
GW_IP=XXX.YYY.ZZZ.III
GW_PORT=<port number>
```

1. Create the HTTPRoute resources:

```shell
Expand Down
51 changes: 33 additions & 18 deletions examples/grpc-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ to route traffic to that application using GRPCRoute resources.

1. Follow the [installation instructions](https://docs.nginx.com/nginx-gateway-fabric/installation/) to deploy NGINX Gateway Fabric.

1. Save the public IP address of NGINX Gateway Fabric into a shell variable:

```text
GW_IP=XXX.YYY.ZZZ.III
```

1. Save the port of NGINX Gateway Fabric:

```text
GW_PORT=<port number>
```

## 2. Deploy the Helloworld Application

1. Create the two helloworld Deployments and Services:
Expand Down Expand Up @@ -60,7 +48,16 @@ There are 3 options to configure gRPC routing. To access the application and tes
kubectl apply -f exact-method.yaml
```

2. Test the Application:
After creating the Gateway resource, NGINX Gateway Fabric will provision an NGINX Pod and Service fronting it to route traffic.

Save the public IP address and port of the NGINX Service into shell variables:

```text
GW_IP=XXX.YYY.ZZZ.III
GW_PORT=<port number>
```

1. Test the Application:

```shell
grpcurl -plaintext -proto grpc.proto -authority bar.com -d '{"name": "exact"}' ${GW_IP}:${GW_PORT} helloworld.Greeter/SayHello
Expand All @@ -72,7 +69,7 @@ There are 3 options to configure gRPC routing. To access the application and tes
}
```

3. Clean up the Gateway and GRPCRoute resources:
1. Clean up the Gateway and GRPCRoute resources:

```shell
kubectl delete -f exact-method.yaml
Expand All @@ -86,7 +83,16 @@ There are 3 options to configure gRPC routing. To access the application and tes
kubectl apply -f hostname.yaml
```

2. Test the Application:
After creating the Gateway resource, NGINX Gateway Fabric will provision an NGINX Pod and Service fronting it to route traffic.

Save the public IP address and port of the NGINX Service into shell variables:

```text
GW_IP=XXX.YYY.ZZZ.III
GW_PORT=<port number>
```

1. Test the Application:

```shell
grpcurl -plaintext -proto grpc.proto -authority bar.com -d '{"name": "bar server"}' ${GW_IP}:${GW_PORT} helloworld.Greeter/SayHello
Expand Down Expand Up @@ -132,7 +138,7 @@ There are 3 options to configure gRPC routing. To access the application and tes
2024/04/29 09:29:46 Received: foo bar server
```

3. Clean up the Gateway and GRPCRoute resources:
1. Clean up the Gateway and GRPCRoute resources:

```shell
kubectl delete -f hostname.yaml
Expand All @@ -146,7 +152,16 @@ There are 3 options to configure gRPC routing. To access the application and tes
kubectl apply -f headers.yaml
```

2. Test the Application:
After creating the Gateway resource, NGINX Gateway Fabric will provision an NGINX Pod and Service fronting it to route traffic.

Save the public IP address and port of the NGINX Service into shell variables:

```text
GW_IP=XXX.YYY.ZZZ.III
GW_PORT=<port number>
```

1. Test the Application:

```shell
grpcurl -plaintext -proto grpc.proto -authority bar.com -d '{"name": "version one"}' -H 'version: one' ${GW_IP}:${GW_PORT} helloworld.Greeter/SayHello
Expand Down Expand Up @@ -230,7 +245,7 @@ There are 3 options to configure gRPC routing. To access the application and tes
2024/04/29 09:33:26 Received: version two orange
```

3. Clean up the Gateway and GRPCRoute resources:
1. Clean up the Gateway and GRPCRoute resources:

```shell
kubectl delete -f headers.yaml
Expand Down
Loading
Loading