From 5e5029363476fde1db6fd67c4c2cfa7db1875035 Mon Sep 17 00:00:00 2001 From: Jakub Warczarek Date: Fri, 1 Dec 2023 19:55:12 +0100 Subject: [PATCH] Impr --- .../guides/services/grpc.md | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/app/_src/kubernetes-ingress-controller/guides/services/grpc.md b/app/_src/kubernetes-ingress-controller/guides/services/grpc.md index 245616dc08a6..29b4c20070b3 100644 --- a/app/_src/kubernetes-ingress-controller/guides/services/grpc.md +++ b/app/_src/kubernetes-ingress-controller/guides/services/grpc.md @@ -54,7 +54,7 @@ spec: app: grpcbin spec: containers: - - image: moul/grpcbin + - image: kong/grpcbin name: grpcbin ports: - containerPort: 9000 @@ -67,13 +67,13 @@ deployment.apps/grpcbin created service/grpcbin created ``` -### gRPC over HTTPS +## gRPC over HTTPS -## Create a certificate +### Create a certificate {% include /md/kic/add-certificate.md hostname='example.com' kong_version=page.kong_version cert_required=true %} -## Route gRPC traffic +### Route gRPC traffic Now that the test application is running, you can create GRPC routing configuration that proxies traffic to the application: @@ -215,21 +215,6 @@ proxies traffic to the application: {% navtab Gateway API %} If you are using the Gateway APIs (GRPCRoute), your Gateway needs additional configuration under `listeners`. -```bash -kubectl patch --type=json gateway kong -p='[ - - { - "op":"add", - "path":"/spec/listeners/-", - "value":{ - "name":"grpc", - "port":80, - "protocol":"HTTP" - } - } -]' -``` - ```bash echo 'apiVersion: gateway.networking.k8s.io/v1alpha2 kind: GRPCRoute @@ -300,7 +285,7 @@ ingress.networking.k8s.io/grpcbin created Use `grpcurl` to send a gRPC request through the proxy: ```bash -grpcurl -plaintext -d '{"greeting": "Kong"}' -servername example.com $PROXY_IP:80 hello.HelloService.SayHello +grpcurl -plaintext -d '{"greeting": "Kong"}' -authority example.com $PROXY_IP:80 hello.HelloService.SayHello ``` The results should look like this: