From bc2805ac8d325997c05daaeb4618e305831bdca5 Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Wed, 17 Aug 2022 16:05:50 -0600 Subject: [PATCH 1/7] Split installation into two docs --- docs/installation.md | 21 +++++++++++---------- docs/running-on-kind.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 docs/running-on-kind.md diff --git a/docs/installation.md b/docs/installation.md index 6b2baa2fee..72e3ca3ae1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,24 +1,23 @@ # Installation +This guide walks you through how to install NGINX Kubernetes Gateway on a generic Kubernetes cluster. + ## Prerequisites -Before you can install the NGINX Kubernetes Gateway, make sure you have the following software installed on your machine: - [kubectl](https://kubernetes.io/docs/tasks/tools/) +- Kubernetes 1.16+ cluster -## Deploy the Gateway +## Deploy NGINX Kubernetes Gateway > Note: NGINX Kubernetes Gateway can only run in the `nginx-gateway` namespace. This limitation will be addressed in the future releases. -You can deploy NGINX Kubernetes Gateway on an existing Kubernetes 1.16+ cluster. The following instructions walk through the steps for deploying on a [kind](https://kind.sigs.k8s.io/) cluster. - -1. Load the NGINX Kubernetes Gateway image onto your kind cluster: +1. Clone the repo and change into the `nginx-kubernetes-gateway` directory: ``` - kind load docker-image nginx-kubernetes-gateway:edge + git clone https://github.com/nginxinc/nginx-kubernetes-gateway.git + cd nginx-kubernetes-gateway ``` - Make sure to substitute the image name with the name of the image you built. - 1. Install the Gateway CRDs: ``` @@ -45,8 +44,6 @@ You can deploy NGINX Kubernetes Gateway on an existing Kubernetes 1.16+ cluster. 1. Deploy the NGINX Kubernetes Gateway: - Before deploying, make sure to update the Deployment spec in `nginx-gateway.yaml` to reference the image you built. - ``` kubectl apply -f deploy/manifests/nginx-gateway.yaml ``` @@ -108,3 +105,7 @@ Create a service with type `LoadBalancer` using the appropriate manifest for you ``` nslookup ``` + +### Use NGINX Kubernetes Gateway + +To get started, follow the tutorials in the [examples](../examples/) directory. diff --git a/docs/running-on-kind.md b/docs/running-on-kind.md new file mode 100644 index 0000000000..2f55869fcc --- /dev/null +++ b/docs/running-on-kind.md @@ -0,0 +1,37 @@ +# Running on Kind + +This guide walks you through how to run NGINX Kubernetes Gateway on a [Kind](https://kind.sigs.k8s.io/) cluster. + +## Prerequisites + +- [kubectl](https://kubernetes.io/docs/tasks/tools/) +- [kind](https://kind.sigs.k8s.io/) + +## Prepare Cluster + +Create a cluster with Kind. You can follow their [instructions](https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster), or run the following make command at the root of the repository: + +``` +make create-kind-cluster +``` + +## Deploy NGINX Kubernetes Gateway + +Follow the [installation](./installation.md) instructions to deploy NGINX Kubernetes Gateway on your Kind cluster. + +## Access NGINX Kubernetes Gateway + +For HTTP traffic, forward local port 8080 to port 80 of the nginx-gateway Pod: + +``` +kubectl -n nginx-gateway port-forward 8080:80 +``` + +For HTTPS traffic, forward local port 8443 to port 443 of the nginx-gateway Pod: + +``` +kubectl -n nginx-gateway port-forward 8443:443 +``` + +## Use NGINX Kubernetes Gateway +To get started, follow the tutorials in the [examples](../examples/) directory. From 634d0efaeb92dfd723dec02f8e438071f0083e51 Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Thu, 18 Aug 2022 10:04:39 -0600 Subject: [PATCH 2/7] Update image repository in manifests --- deploy/manifests/nginx-gateway.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/manifests/nginx-gateway.yaml b/deploy/manifests/nginx-gateway.yaml index 995961393a..127f52a0c0 100644 --- a/deploy/manifests/nginx-gateway.yaml +++ b/deploy/manifests/nginx-gateway.yaml @@ -86,7 +86,7 @@ spec: - name: nginx-config mountPath: /etc/nginx containers: - - image: nginx-kubernetes-gateway:edge + - image: ghcr.io/nginxinc/nginx-kubernetes-gateway:edge imagePullPolicy: IfNotPresent name: nginx-gateway volumeMounts: From 2a5039a4c735f387091185aa01b5014f877c3d53 Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Thu, 18 Aug 2022 11:53:18 -0600 Subject: [PATCH 3/7] Do not capitalize kind --- docs/running-on-kind.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/running-on-kind.md b/docs/running-on-kind.md index 2f55869fcc..c6b0487ea7 100644 --- a/docs/running-on-kind.md +++ b/docs/running-on-kind.md @@ -1,6 +1,6 @@ # Running on Kind -This guide walks you through how to run NGINX Kubernetes Gateway on a [Kind](https://kind.sigs.k8s.io/) cluster. +This guide walks you through how to run NGINX Kubernetes Gateway on a [kind](https://kind.sigs.k8s.io/) cluster. ## Prerequisites @@ -9,7 +9,7 @@ This guide walks you through how to run NGINX Kubernetes Gateway on a [Kind](htt ## Prepare Cluster -Create a cluster with Kind. You can follow their [instructions](https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster), or run the following make command at the root of the repository: +Create a cluster with `kind`. You can follow their [instructions](https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster), or run the following make command at the root of the repository: ``` make create-kind-cluster From a46a4fc7ddb365cf422d597c6225617aa532274b Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Thu, 18 Aug 2022 12:13:21 -0600 Subject: [PATCH 4/7] Change image pull policy to always --- deploy/manifests/nginx-gateway.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/manifests/nginx-gateway.yaml b/deploy/manifests/nginx-gateway.yaml index 127f52a0c0..cec3b5b2eb 100644 --- a/deploy/manifests/nginx-gateway.yaml +++ b/deploy/manifests/nginx-gateway.yaml @@ -87,7 +87,7 @@ spec: mountPath: /etc/nginx containers: - image: ghcr.io/nginxinc/nginx-kubernetes-gateway:edge - imagePullPolicy: IfNotPresent + imagePullPolicy: Always name: nginx-gateway volumeMounts: - name: nginx-config From 7a1f61b920b72fbb2b28d38a9465ccc7daf4dfd0 Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Thu, 18 Aug 2022 12:17:12 -0600 Subject: [PATCH 5/7] Changes to kind doc --- docs/running-on-kind.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/running-on-kind.md b/docs/running-on-kind.md index c6b0487ea7..c97211c49c 100644 --- a/docs/running-on-kind.md +++ b/docs/running-on-kind.md @@ -21,17 +21,13 @@ Follow the [installation](./installation.md) instructions to deploy NGINX Kubern ## Access NGINX Kubernetes Gateway -For HTTP traffic, forward local port 8080 to port 80 of the nginx-gateway Pod: +Forward local ports 8080 and 8443 to ports 80 and of the nginx-gateway Pod: ``` -kubectl -n nginx-gateway port-forward 8080:80 +kubectl -n nginx-gateway port-forward 8080:80 8443:443 ``` -For HTTPS traffic, forward local port 8443 to port 443 of the nginx-gateway Pod: - -``` -kubectl -n nginx-gateway port-forward 8443:443 -``` +> Note: NGINX will not listen on any ports until you configure a [Gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/#gateway) resource with a valid listener. ## Use NGINX Kubernetes Gateway To get started, follow the tutorials in the [examples](../examples/) directory. From 428163b24d542af050d01e290261830fa40996f1 Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Thu, 18 Aug 2022 12:24:45 -0600 Subject: [PATCH 6/7] Fix typo --- docs/running-on-kind.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/running-on-kind.md b/docs/running-on-kind.md index c97211c49c..cfde19827e 100644 --- a/docs/running-on-kind.md +++ b/docs/running-on-kind.md @@ -21,7 +21,7 @@ Follow the [installation](./installation.md) instructions to deploy NGINX Kubern ## Access NGINX Kubernetes Gateway -Forward local ports 8080 and 8443 to ports 80 and of the nginx-gateway Pod: +Forward local ports 8080 and 8443 to ports 80 and 443 of the nginx-gateway Pod: ``` kubectl -n nginx-gateway port-forward 8080:80 8443:443 From 56b3f517b3e3085ecd8d61ca6b9bd8979b0174f8 Mon Sep 17 00:00:00 2001 From: kate-osborn <50597707+kate-osborn@users.noreply.github.com> Date: Thu, 18 Aug 2022 13:15:40 -0600 Subject: [PATCH 7/7] Another Kind-> kind change Co-authored-by: Luca Comellini --- docs/running-on-kind.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/running-on-kind.md b/docs/running-on-kind.md index cfde19827e..6ce783a8c4 100644 --- a/docs/running-on-kind.md +++ b/docs/running-on-kind.md @@ -1,4 +1,4 @@ -# Running on Kind +# Running on `kind` This guide walks you through how to run NGINX Kubernetes Gateway on a [kind](https://kind.sigs.k8s.io/) cluster.