Skip to content

Commit 6b910a2

Browse files
prasadkattijohngmyers
authored andcommitted
docs: fix gRPCServer example (kubernetes-sigs#2954)
* docs: make external-dns optional in echoserver walkthrough * Update link to external-dns Co-authored-by: John Gardiner Myers <[email protected]> * use the `alb.ingress.kubernetes.io/ssl-redirect` annotation * misc docs fixes * update commands to verify logs for awslbc and external-dns Co-authored-by: John Gardiner Myers <[email protected]>
1 parent 44c06a3 commit 6b910a2

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

docs/examples/grpc/grpcserver-ingress.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apiVersion: networking.k8s.io/v1
22
kind: Ingress
33
metadata:
44
annotations:
5-
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig":
6-
{ "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
5+
alb.ingress.kubernetes.io/ssl-redirect: '443'
76
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
87
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
98
alb.ingress.kubernetes.io/scheme: internet-facing
@@ -19,13 +18,6 @@ spec:
1918
- host: grpcserver.example.com
2019
http:
2120
paths:
22-
- backend:
23-
service:
24-
name: ssl-redirect
25-
port:
26-
name: use-annotation
27-
path: /
28-
pathType: Prefix
2921
- backend:
3022
service:
3123
name: grpcserver

docs/examples/grpc_server.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ The following resources are required prior to deployment:
1313
- aws-load-balancer-controller
1414
- external-dns
1515

16-
See [echo_server.md](echo_server.md) for setup instructions for those resources.
16+
See [echo_server.md](echo_server.md) and [external_dns.md](/guide/integrations/external_dns) for setup instructions for those resources.
1717

1818
## Create an ACM certificate
1919
> NOTE: An ACM certificate is required for this demo as the application uses the `grpc.secure_channel` method.
2020
2121
If you already have an ACM certificate (including wildcard certificates) for the domain you would like to use in this example, you can skip this step.
2222

23-
- Request a certificate for a domain you own using the steps described in the official AWS [documentation](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html).
23+
- Request a certificate for a domain you own using the steps described in the official [AWS ACM documentation](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html).
2424
- Once the status for the certificate is "Issued" continue to the next step.
2525

2626
## Deploy the grpcserver manifests
@@ -65,7 +65,7 @@ If you already have an ACM certificate (including wildcard certificates) for the
6565

6666
1. Change the domain name from `grpcserver.example.com` to your desired domain.
6767

68-
> NOTE: This example manifest assumes that you have tagged your subnets for the aws-load-balancer-controller. Otherwise add your subnets using the annotations described in ingress annotations documentation.
68+
1. The example manifest assumes that you have tagged your subnets for the aws-load-balancer-controller. Otherwise add your subnets using the [alb.ingress.kubernetes.io/subnets](/guide/ingress/annotations/#subnets) annotation.
6969

7070
1. Deploy the ingress resource for grpcserver.
7171

@@ -75,11 +75,11 @@ If you already have an ACM certificate (including wildcard certificates) for the
7575

7676
1. Wait a few minutes for the ALB to provision and for DNS to update.
7777

78-
1. Check the logs for `external-dns` and `aws-load-balancer-controller` to ensure the ALB is created and external-dns creates the record and points your domain to the ALB.
78+
1. Check the `aws-load-balancer-controller` logs to ensure the ALB is created. Also ensure that `external-dns` creates a DNS record that points your domain to the ALB.
7979

8080
```bash
81-
kubectl logs -n kube-system $(kubectl get po -n kube-system | egrep -o 'aws-load-balancer-controller[a-zA-Z0-9-]+') | grep 'grpcserver\/grpcserver'
82-
kubectl logs -n kube-system $(kubectl get po -n kube-system | egrep -o 'aws-load-balancer-controller[a-zA-Z0-9-]+') | grep 'YOUR_DOMAIN_NAME'
81+
kubectl logs -n kube-system --tail -1 -l app.kubernetes.io/name=aws-load-balancer-controller | grep 'grpcserver\/grpcserver'
82+
kubectl logs -n kube-system --tail -1 -l app.kubernetes.io/name=external-dns | grep 'YOUR_DOMAIN_NAME'
8383
```
8484

8585
1. Next check that your ingress shows the correct ALB address and custom domain name.
@@ -91,8 +91,8 @@ If you already have an ACM certificate (including wildcard certificates) for the
9191
You should see similar to the following.
9292

9393
```console
94-
NNAME CLASS HOSTS ADDRESS PORTS AGE
95-
grpcserver <none> YOUR_DOMAIN_NAME ALB-NAME.us-east-1.elb.amazonaws.com 80 90m
94+
NNAME CLASS HOSTS ADDRESS PORTS AGE
95+
grpcserver alb YOUR_DOMAIN_NAME ALB-DNS-NAME 80 90m
9696
```
9797

9898
1. Finally, test your secure gRPC service by running the greeter client, substituting `YOUR_DOMAIN_NAME` for the domain you used in the ingress manifest.

0 commit comments

Comments
 (0)