<commit_before># gRPC on Gateway Controller

End-to-end example of gRPC Load Balancing with gRPC:

* Deploy gRPC application on GKE
* Enable Gateways to handle both internet facing and internal-only traffic.
* Verify gRPC LoadBalancing through Gateway

---

First deploy a GKE cluster with NEG enabled:

```bash
gcloud container  clusters create cluster-1 --machine-type "n1-standard-2" \
 --zone us-central1-a  --num-nodes 2 --enable-ip-alias  \
 --cluster-version "1.20"  -q
```


Create SSL Certificate

Note, as of `5/6/21`, Gateway does not support [spec.listeners.tls.certificateRefs](https://cloud.google.com/kubernetes-engine/docs/how-to/gatewayclass-capabilities#gateway) so we have to upload a static cert to GCP.  Note we are creating two sets of certificates scoped for global and regional to account for external LB (global) and ILB (regional)

```bash
gcloud beta compute ssl-certificates create gcp-cert-grpc-global \
   --global --certificate server.crt --private-key server.key 
gcloud beta compute ssl-certificates create gcp-cert-grpc-us-central \
   --region=us-central1 --certificate server.crt --private-key server.key 
```

Wait maybe 2 mins for the Gateway controllers to get initialized.

Deploy application

```bash
kubectl apply -f .
```

Wait another 8mins for the IP address for the loadbalancers to get initialized

Check gateway status

```bash
$ kubectl get gatewayclass,gateway
NAME                                           CONTROLLER
gatewayclass.networking.x-k8s.io/gke-l7-gxlb   networking.gke.io/gateway
gatewayclass.networking.x-k8s.io/gke-l7-rilb   networking.gke.io/gateway

NAME                                         CLASS
gateway.networking.x-k8s.io/gke-l7-gxlb-gw   gke-l7-gxlb
gateway.networking.x-k8s.io/gke-l7-rilb-gw   gke-l7-rilb
```<commit_msg>beta->ga for sslcerts<commit_after># gRPC on Gateway Controller

End-to-end example of gRPC Load Balancing with gRPC:

* Deploy gRPC application on GKE
* Enable Gateways to handle both internet facing and internal-only traffic.
* Verify gRPC LoadBalancing through Gateway

---

First deploy a GKE cluster with NEG enabled:

```bash
gcloud container  clusters create cluster-1 --machine-type "n1-standard-2" \
 --zone us-central1-a  --num-nodes 2 --enable-ip-alias  \
 --cluster-version "1.20"  -q
```


Create SSL Certificate

Note, as of `5/6/21`, Gateway does not support [spec.listeners.tls.certificateRefs](https://cloud.google.com/kubernetes-engine/docs/how-to/gatewayclass-capabilities#gateway) so we have to upload a static cert to GCP.  Note we are creating two sets of certificates scoped for global and regional to account for external LB (global) and ILB (regional)

```bash
gcloud compute ssl-certificates create gcp-cert-grpc-global \
   --global --certificate server.crt --private-key server.key 
gcloud compute ssl-certificates create gcp-cert-grpc-us-central \
   --region=us-central1 --certificate server.crt --private-key server.key 
```

Wait maybe 2 mins for the Gateway controllers to get initialized.

Deploy application

```bash
kubectl apply -f .
```

Wait another 8mins for the IP address for the loadbalancers to get initialized

Check gateway status

```bash
$ kubectl get gatewayclass,gateway
NAME                                           CONTROLLER
gatewayclass.networking.x-k8s.io/gke-l7-gxlb   networking.gke.io/gateway
gatewayclass.networking.x-k8s.io/gke-l7-rilb   networking.gke.io/gateway

NAME                                         CLASS
gateway.networking.x-k8s.io/gke-l7-gxlb-gw   gke-l7-gxlb
gateway.networking.x-k8s.io/gke-l7-rilb-gw   gke-l7-rilb
```
{'fraction_non_alphanumeric': 0.09805013927576602, 'fraction_numerical': 0.013927576601671309, 'mean_word_length': 3.1853146853146854, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '883262', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1163, 'n_words': 346}