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
Copy file name to clipboardExpand all lines: build/Dockerfile
+1-1
Original file line number
Diff line number
Diff line change
@@ -294,7 +294,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
294
294
&& dnf clean all
295
295
296
296
############################################# Base image for UBI with NGINX Plus and App Protect WAF & DoS #############################################
297
-
FROM redhat/ubi8@sha256:f4292f415f60632a0ff9c0646c4fa859d8b2e1e88a16faa90c6decd1951aea88 as ubi-8-plus-nap
297
+
FROM redhat/ubi8@sha256:2a5d23450fb9b0cb266b4d465b36f1d1bc7c9b5a9b785528215b470b44f04209 as ubi-8-plus-nap
298
298
ARG NAP_MODULES
299
299
300
300
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
- VirtualServer and VirtualServerRoute resources for gRPC applications must include TLS termination.
12
-
13
-
## Example
14
-
15
-
```yaml
16
-
apiVersion: k8s.nginx.org/v1
17
-
kind: VirtualServer
18
-
metadata:
19
-
name: grpc-vs
20
-
spec:
21
-
host: grpc.example.com
22
-
tls:
23
-
secret: grpc-secret
24
-
upstreams:
25
-
- name: grpc1
26
-
service: grpc-svc
27
-
port: 50051
28
-
type: grpc
29
-
routes:
30
-
- path: /helloworld.Greeter
31
-
action:
32
-
pass: grpc1
8
+
1. HTTP/2 must be enabled using the `http2`[ConfigMap key](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/#listeners).
9
+
10
+
2. Configure TLS termination for VirtualServer and VirtualServerRoute resources.
11
+
12
+
3. A working [`grpcurl`](https://github.com/fullstorydev/grpcurl) installation.
13
+
14
+
4.[Install NGINX Ingress Controller using Manifests](https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/)
15
+
16
+
5. Save the public IP address of NGINX Ingress Controller into a shell variable:
17
+
18
+
```shell
19
+
IC_IP=XXX.YYY.ZZZ.III
20
+
```
21
+
22
+
6. Save the HTTPS port of NGINX Ingress Controller into a shell variable:
23
+
24
+
```shell
25
+
IC_HTTPS_PORT=<port number>
26
+
```
27
+
28
+
## Step 1 - Update ConfigMap with `http2: "true"`
29
+
30
+
```shell
31
+
kubectl apply -f nginx-config
33
32
```
34
33
35
-
*grpc-svc* is a service for the gRPC application. The service becomes available at the `/helloworld.Greeter` path. Note
36
-
how we used the **type: grpc** field in the Upstream configuration.
34
+
## Step 2 - Deploy the Cafe Application
35
+
36
+
Create the coffee and the tea deployments and services:
37
+
38
+
```shell
39
+
kubectl apply -f greeter-app.yaml
40
+
```
41
+
42
+
## Step 3 - Configure TLS termination and Load balancing
43
+
44
+
1. Create the secret with the TLS certificate and key:
45
+
46
+
```shell
47
+
kubectl create -f greeter-secret.yaml
48
+
```
49
+
50
+
2. Create the VirtualServer resource:
51
+
52
+
```shell
53
+
kubectl create -f greeter-virtual-server.yaml
54
+
```
55
+
56
+
## Step 4 - Test the Configuration
57
+
58
+
Access the application using `grpcurl`. Use the `-insecure` flag to turn off certificate verification for the self-signed certificate.
0 commit comments