Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benchkram/k8s-gateway-example
https://github.com/benchkram/k8s-gateway-example
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/benchkram/k8s-gateway-example
- Owner: benchkram
- Created: 2023-05-05T12:15:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-05T14:55:29.000Z (over 1 year ago)
- Last Synced: 2024-11-06T03:48:09.274Z (about 2 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How To: Replacing Your Ingress With the Novel Kubernetes Gateways
This is the repository for the blog post [Replacing Your Ingress With the Novel Kubernetes Gateways](https://benchkram.de/blog/dev/replace-kubernetes-ingress-with-gateway-api).
## Set up the Cluster with Ingress
```bash
kind create cluster --name ingress-example
kubectl config use-context kind-ingress-example
kubectl apply -f nginx-ingress/nginx-ingress-controller.yaml
kubectl apply -f pods-service-manifest.yaml
kubectl apply -f ingress-manifest.yamlkubectl get pods -n ingress-nginx
kubectl port-forward -n ingress-nginx nginx-ingress-controller- 8080:80
curl localhost:8080/service-a
curl localhost:8080/service-b
```## Set up the Cluster with Gateways
```bash
kind create cluster --name gateway-example
kubectl config use-context kind-gateway-example
kubectl create namespace nginx-gateway
kubectl create configmap njs-modules --from-file=nginx-gateway/httpmatches.js -n nginx-gateway
kubectl apply -f nginx-gateway/nginx-gateway-controller.yaml
kubectl apply -f gatewayclass-manifest.yaml
# check it's working
kubectl get pods -n nginx-gatewaykubectl apply -f pods-service-manifest.yaml
kubectl apply -f gateway-manifest.yamlkubectl get pods -n nginx-gateway
kubectl port-forward -n nginx-gateway 8080:80
curl localhost:8080/service-a
curl localhost:8080/service-b
```