-
Notifications
You must be signed in to change notification settings - Fork 118
Doc 288 Deploying NGINX Gateway Fabric on a kind Cluster #1339
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 all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9d843e0
doc: edits to running on kind
travisamartin 72f0ccb
chore: edits
travisamartin 58f2807
chore: edits
travisamartin 82aca59
chore: edits
travisamartin 90beab0
merged changes from main
travisamartin 1dd3e71
fixed link format
travisamartin bc3bde1
applied suggested edits
travisamartin 398c34c
Merge branch 'main' into DOC-288-running-on-kind-edits
travisamartin 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,61 @@ | ||
--- | ||
title: "Running on kind" | ||
description: "Learn how to run NGINX Gateway Fabric on a kind cluster." | ||
title: "Deploying NGINX Gateway Fabric on a kind Cluster" | ||
description: "Learn how to run NGINX Gateway Fabric on a kind (Kubernetes in Docker) cluster." | ||
weight: 300 | ||
toc: true | ||
docs: "DOCS-000" | ||
--- | ||
|
||
{{< custom-styles >}} | ||
|
||
## Prerequisites | ||
|
||
- [kubectl](https://kubernetes.io/docs/tasks/tools/) | ||
- [kind](https://kind.sigs.k8s.io/) | ||
To complete the steps in this guide, you first need to install the following tools for Kubernetes management and development: | ||
|
||
## Prepare Cluster | ||
- [kubectl](https://kubernetes.io/docs/tasks/tools/): A command-line interface for Kubernetes that allows you to manage and inspect cluster resources, and control containerized applications. | ||
- [kind](https://kind.sigs.k8s.io/): Short for _Kubernetes in Docker_, this tool lets you run Kubernetes clusters locally using Docker containers, ideal for testing and development purposes. | ||
|
||
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: | ||
|
||
```makefile | ||
make create-kind-cluster | ||
``` | ||
## Create a kind Cluster | ||
|
||
To create a kind cluster, choose from the following options: | ||
|
||
- **Option 1**: Use the `kind` tool. For detailed instructions, refer to the kind quick start guide [Creating a Cluster](https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster). | ||
|
||
- **Option 2**: Run the following `make` command in the root of your repository: | ||
|
||
```makefile | ||
make create-kind-cluster | ||
``` | ||
|
||
This command creates a kind cluster using the settings from your Makefile. | ||
|
||
|
||
## Deploy NGINX Gateway Fabric | ||
|
||
Follow the [installation](./how-to/installation/installation.md) instructions to deploy NGINX Gateway Fabric on your Kind cluster. | ||
Now that you've created a kind cluster, the next step is to install NGINX Gateway Fabric. | ||
|
||
To install NGINX Gateway Fabric, choose the appropriate installation guide that suits your setup: | ||
|
||
{{<note>}} For `kind` clusters, NodePort services require [extra configuration](https://kind.sigs.k8s.io/docs/user/configuration/#nodeport-with-port-mappings) and LoadBalancer services need [a third-party controller](https://kind.sigs.k8s.io/docs/user/loadbalancer/) like MetalLB for external IP assignment. However, the Helm chart creates a LoadBalancer service by default. To avoid this, you can disable service creation by adding `--set service.create=false` to your Helm command and use the port-forwarding command below instead to try out the examples. {{</note>}} | ||
- [Installation with Helm]({{< relref "installation/installing-ngf/helm.md" >}}) | ||
- [Installation with Kubernetes manifests]({{< relref "installation/installing-ngf/manifests.md" >}}) | ||
|
||
## Access NGINX Gateway Fabric | ||
{{<note>}} | ||
When using kind clusters, be aware that NodePort services require [additional setup](https://kind.sigs.k8s.io/docs/user/configuration/#nodeport-with-port-mappings). Also, for LoadBalancer services, you’ll need a [third-party controller](https://kind.sigs.k8s.io/docs/user/loadbalancer/) like MetalLB to assign external IPs. The default Helm chart creates a LoadBalancer service; however, you can disable this by adding `--set service.create=false` to your Helm command. Afterward, you can [configure port forwarding](#configure-port-forwarding) as described below to access the examples. | ||
{{</note>}} | ||
|
||
Forward local ports 8080 and 8443 to ports 80 and 443 of the nginx-gateway Pod: | ||
## Configure Port Forwarding {#configure-port-forwarding} | ||
|
||
Once NGINX Gateway Fabric has been installed, you need to configure port forwarding from local ports **8080** and **8443** to ports **80** and **443** on the **nginx-gateway** Pod. | ||
|
||
To configure port forwarding, run the following command: | ||
|
||
```shell | ||
kubectl -n nginx-gateway port-forward <pod-name> 8080:80 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. {{</note>}} | ||
|
||
{{< note >}}NGINX will only start listening on these ports after you set up a [Gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/#gateway) resource with a valid listener.{{</note>}} | ||
|
||
## Use NGINX Gateway Fabric | ||
## Getting Started with NGINX Gateway Fabric | ||
|
||
To get started, follow the tutorials in the [examples](../examples) directory. | ||
Learn how to use NGINX Gateway Fabric by exploring the tutorials in the [examples](https://github.com/nginxinc/nginx-gateway-fabric/tree/main/examples) directory. The guides provide practical instructions and scenarios to help you use NGINX Gateway Fabric effectively. |
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.