-
Notifications
You must be signed in to change notification settings - Fork 141
Move parts of the README into separate docs #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
35ecbde
Move parts of the README into separate docs
pleshakov dfb89a5
Add kubectl as a prerequisite
pleshakov cbbdc43
Remove private
pleshakov 974c459
Clarify about EXTERNAL-IP column
pleshakov 74a70d7
Add a note about nginx-gateway namespace
pleshakov d79c8ea
Fix broken links
pleshakov 4a6d738
Merge branch 'main' into docs/reorganize-docs
pleshakov f95235f
Merge branch 'main' into docs/reorganize-docs
pleshakov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Building the Image | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before you can build the NGINX Kubernetes Gateway, make sure you have the following software installed on your machine: | ||
| - [git](https://git-scm.com/) | ||
| - [GNU Make](https://www.gnu.org/software/software.html) | ||
| - [Docker](https://www.docker.com/) v18.09+ | ||
|
|
||
| ## Steps | ||
|
|
||
| 1. Clone the repo and change into the `nginx-kubernetes-gateway` directory: | ||
|
|
||
| ``` | ||
| git clone https://github.com/nginxinc/nginx-kubernetes-gateway.git | ||
| cd nginx-kubernetes-gateway | ||
| ``` | ||
|
|
||
| 1. Build the image: | ||
|
|
||
| ``` | ||
| make PREFIX=myregistry.example.com/nginx-kubernetes-gateway container | ||
| ``` | ||
|
|
||
| Set the `PREFIX` variable to the name of the registry you'd like to push the image to. By default, the image will be named `nginx-kubernetes-gateway:0.0.1`. | ||
|
|
||
| 1. Push the image to your container registry: | ||
|
|
||
| ``` | ||
| docker push myregistry.example.com/nginx-kubernetes-gateway:0.0.1 | ||
| ``` | ||
|
|
||
| Make sure to substitute `myregistry.example.com/nginx-kubernetes-gateway` with your registry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # Installation | ||
|
|
||
| ## 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/) | ||
|
|
||
| ## Deploy the 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. | ||
f5yacobucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 1. Load the NGINX Kubernetes Gateway image onto your kind cluster: | ||
|
|
||
| ``` | ||
| kind load docker-image nginx-kubernetes-gateway:0.0.1 | ||
f5yacobucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| Make sure to substitute the image name with the name of the image you built. | ||
|
|
||
| 1. Install the Gateway CRDs: | ||
|
|
||
| ``` | ||
| kubectl apply -k "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.5.0" | ||
| ``` | ||
|
|
||
| 1. Create the nginx-gateway namespace: | ||
f5yacobucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
| kubectl apply -f deploy/manifests/namespace.yaml | ||
| ``` | ||
|
|
||
| 1. Create the njs-modules configmap: | ||
|
|
||
| ``` | ||
| kubectl create configmap njs-modules --from-file=internal/nginx/modules/src/httpmatches.js -n nginx-gateway | ||
| ``` | ||
|
|
||
| 1. Create the GatewayClass resource: | ||
|
|
||
| ``` | ||
| kubectl apply -f deploy/manifests/gatewayclass.yaml | ||
| ``` | ||
|
|
||
| 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 | ||
| ``` | ||
|
|
||
| 1. Confirm the NGINX Kubernetes Gateway is running in `nginx-gateway` namespace: | ||
|
|
||
| ``` | ||
| kubectl get pods -n nginx-gateway | ||
| NAME READY STATUS RESTARTS AGE | ||
| nginx-gateway-5d4f4c7db7-xk2kq 2/2 Running 0 112s | ||
| ``` | ||
|
|
||
| ## Expose NGINX Kubernetes Gateway | ||
|
|
||
| You can gain access to NGINX Kubernetes Gateway by creating a `NodePort` Service or a `LoadBalancer` Service. | ||
|
|
||
| ### Create a NodePort Service | ||
|
|
||
| Create a service with type `NodePort`: | ||
f5yacobucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
| kubectl apply -f deploy/manifests/service/nodeport.yaml | ||
| ``` | ||
|
|
||
| A `NodePort` service will randomly allocate one port on every node of the cluster. To access NGINX Kubernetes Gateway, use an IP address of any node in the cluster along with the allocated port. | ||
|
|
||
| ### Create a LoadBalancer Service | ||
|
|
||
| Create a service with type `LoadBalancer` using the appropriate manifest for your cloud provider. | ||
|
|
||
| - For GCP or Azure: | ||
|
|
||
| ``` | ||
| kubectl apply -f deploy/manifests/service/loadbalancer.yaml | ||
| ``` | ||
|
|
||
| Lookup the public IP of the load balancer, which is reported in the `EXTERNAL-IP` column in the output of the following command: | ||
|
|
||
| ``` | ||
| kubectl get svc nginx-gateway -n nginx-gateway | ||
| ``` | ||
|
|
||
| Use the public IP of the load balancer to access NGINX Kubernetes Gateway. | ||
f5yacobucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - For AWS: | ||
|
|
||
| ``` | ||
| kubectl apply -f deploy/manifests/service/loadbalancer-aws-nlb.yaml | ||
| ``` | ||
|
|
||
| In AWS, the NLB DNS name will be reported by Kubernetes in lieu of a public IP in the `EXTERNAL-IP` column. To get the DNS name run: | ||
|
|
||
| ``` | ||
| kubectl get svc nginx-gateway -n nginx-gateway | ||
| ``` | ||
|
|
||
| In general, you should rely on the NLB DNS name, however for testing purposes you can resolve the DNS name to get the IP address of the load balancer: | ||
|
|
||
| ``` | ||
| nslookup <dns-name> | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.