|
1 | 1 | ---
|
2 |
| -title: "Running on kind" |
3 |
| -description: "Learn how to run NGINX Gateway Fabric on a kind cluster." |
| 2 | +title: "Deploying NGINX Gateway Fabric on a kind Cluster" |
| 3 | +description: "Learn how to run NGINX Gateway Fabric on a kind (Kubernetes in Docker) cluster." |
4 | 4 | weight: 300
|
5 | 5 | toc: true
|
6 | 6 | docs: "DOCS-000"
|
7 | 7 | ---
|
8 | 8 |
|
| 9 | +{{< custom-styles >}} |
| 10 | + |
9 | 11 | ## Prerequisites
|
10 | 12 |
|
11 |
| -- [kubectl](https://kubernetes.io/docs/tasks/tools/) |
12 |
| -- [kind](https://kind.sigs.k8s.io/) |
| 13 | +To complete the steps in this guide, you first need to install the following tools for Kubernetes management and development: |
13 | 14 |
|
14 |
| -## Prepare Cluster |
| 15 | +- [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. |
| 16 | +- [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. |
15 | 17 |
|
16 |
| -Create a cluster with `kind`. You can follow |
17 |
| -their [instructions](https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster), or run the following make |
18 |
| -command at the root of the repository: |
19 | 18 |
|
20 |
| -```makefile |
21 |
| -make create-kind-cluster |
22 |
| -``` |
| 19 | +## Create a kind Cluster |
| 20 | + |
| 21 | +To create a kind cluster, choose from the following options: |
| 22 | + |
| 23 | +- **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). |
| 24 | + |
| 25 | +- **Option 2**: Run the following `make` command in the root of your repository: |
| 26 | + |
| 27 | + ```makefile |
| 28 | + make create-kind-cluster |
| 29 | + ``` |
| 30 | + |
| 31 | + This command creates a kind cluster using the settings from your Makefile. |
| 32 | + |
23 | 33 |
|
24 | 34 | ## Deploy NGINX Gateway Fabric
|
25 | 35 |
|
26 |
| -Follow the [installation](./how-to/installation/installation.md) instructions to deploy NGINX Gateway Fabric on your Kind cluster. |
| 36 | +Now that you've created a kind cluster, the next step is to install NGINX Gateway Fabric. |
| 37 | + |
| 38 | +To install NGINX Gateway Fabric, choose the appropriate installation guide that suits your setup: |
27 | 39 |
|
28 |
| -{{<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>}} |
| 40 | +- [Installation with Helm]({{< relref "installation/installing-ngf/helm.md" >}}) |
| 41 | +- [Installation with Kubernetes manifests]({{< relref "installation/installing-ngf/manifests.md" >}}) |
29 | 42 |
|
30 |
| -## Access NGINX Gateway Fabric |
| 43 | +{{<note>}} |
| 44 | +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. |
| 45 | +{{</note>}} |
31 | 46 |
|
32 |
| -Forward local ports 8080 and 8443 to ports 80 and 443 of the nginx-gateway Pod: |
| 47 | +## Configure Port Forwarding {#configure-port-forwarding} |
| 48 | + |
| 49 | +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. |
| 50 | + |
| 51 | +To configure port forwarding, run the following command: |
33 | 52 |
|
34 | 53 | ```shell
|
35 | 54 | kubectl -n nginx-gateway port-forward <pod-name> 8080:80 8443:443
|
36 | 55 | ```
|
37 | 56 |
|
38 |
| -{{<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>}} |
39 |
| - |
| 57 | +{{< 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>}} |
40 | 58 |
|
41 |
| -## Use NGINX Gateway Fabric |
| 59 | +## Getting Started with NGINX Gateway Fabric |
42 | 60 |
|
43 |
| -To get started, follow the tutorials in the [examples](../examples) directory. |
| 61 | +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. |
0 commit comments