|
| 1 | +# NGINX Kubernetes Gateway Helm Chart |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This chart deploys the NGINX Kubernetes Gateway in your Kubernetes cluster. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +- [Helm 3.0+](https://helm.sh/docs/intro/install/) |
| 10 | +- [kubectl](https://kubernetes.io/docs/tasks/tools/) |
| 11 | + |
| 12 | +> Note: NGINX Kubernetes Gateway can only run in the `nginx-gateway` namespace. This limitation will be addressed in |
| 13 | +the future releases. |
| 14 | + |
| 15 | +### Installing the Gateway API resources |
| 16 | + |
| 17 | +> Note: The Gateway API resources from the standard channel (the CRDs and the validating webhook) must be installed |
| 18 | +before deploying NGINX Kubernetes Gateway. If they are already installed in your cluster, please ensure they are the |
| 19 | +correct version as supported by the NGINX Kubernetes Gateway - |
| 20 | +[see the Technical Specifications](../../README.md#technical-specifications). |
| 21 | + |
| 22 | +To install the Gateway resources from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run: |
| 23 | + |
| 24 | +```shell |
| 25 | +kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.7.1/standard-install.yaml |
| 26 | +``` |
| 27 | + |
| 28 | +## Installing the Chart |
| 29 | + |
| 30 | +### Installing the Chart from the OCI Registry |
| 31 | + |
| 32 | +To install the chart with the release name `my-release` (`my-release` is the name that you choose) into the |
| 33 | +nginx-gateway namespace (with optional `--create-namespace` flag - you can omit if the namespace already exists): |
| 34 | + |
| 35 | +```shell |
| 36 | +helm install my-release oci://ghcr.io/nginxinc/charts/nginx-kubernetes-gateway --version 0.0.0-edge --create-namespace --wait -n nginx-gateway |
| 37 | +``` |
| 38 | + |
| 39 | +### Installing the Chart via Sources |
| 40 | + |
| 41 | +#### Pulling the Chart |
| 42 | + |
| 43 | +```shell |
| 44 | +helm pull oci://ghcr.io/nginxinc/charts/nginx-kubernetes-gateway --untar --version 0.0.0-edge |
| 45 | +cd nginx-gateway |
| 46 | +``` |
| 47 | + |
| 48 | +#### Installing the Chart |
| 49 | + |
| 50 | +To install the chart with the release name `my-release` (`my-release` is the name that you choose) into the |
| 51 | +nginx-gateway namespace (with optional `--create-namespace` flag - you can omit if the namespace already exists): |
| 52 | + |
| 53 | +```shell |
| 54 | +helm install my-release . --create-namespace --wait -n nginx-gateway |
| 55 | +``` |
| 56 | + |
| 57 | +## Upgrading the Chart |
| 58 | +### Upgrading the Gateway Resources |
| 59 | +Before you upgrade a release, ensure the Gateway API resources are the correct version as supported by the NGINX |
| 60 | +Kubernetes Gateway - [see the Technical Specifications](../../README.md#technical-specifications).: |
| 61 | + |
| 62 | +To upgrade the Gateway resources from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run: |
| 63 | + |
| 64 | +```shell |
| 65 | +kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.7.1/standard-install.yaml |
| 66 | +``` |
| 67 | + |
| 68 | +### Upgrading the Chart from the OCI Registry |
| 69 | +To upgrade the release `my-release`, run: |
| 70 | + |
| 71 | +```shell |
| 72 | +helm upgrade my-release oci://ghcr.io/nginxinc/charts/nginx-kubernetes-gateway --version 0.0.0-edge -n nginx-gateway |
| 73 | +``` |
| 74 | + |
| 75 | +### Upgrading the Chart from the Sources |
| 76 | + |
| 77 | +Pull the chart sources as described in [Pulling the Chart](#pulling-the-chart), if not already present. Then, to upgrade |
| 78 | +the release `my-release`, run: |
| 79 | + |
| 80 | +```shell |
| 81 | +helm upgrade my-release . -n nginx-gateway |
| 82 | +``` |
| 83 | + |
| 84 | +## Uninstalling the Chart |
| 85 | + |
| 86 | +To uninstall/delete the release `my-release`: |
| 87 | + |
| 88 | +```shell |
| 89 | +helm uninstall my-release -n nginx-gateway |
| 90 | +``` |
| 91 | + |
| 92 | +The command removes all the Kubernetes components associated with the release and deletes the release. |
| 93 | + |
| 94 | +### Uninstalling the Gateway Resources |
| 95 | + |
| 96 | +>**Warning: This command will delete all the corresponding custom resources in your cluster across all namespaces! |
| 97 | +Please ensure there are no custom resources that you want to keep and there are no other Gateway API implementations |
| 98 | +running in the cluster!** |
| 99 | + |
| 100 | +To delete the Gateway resources using [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run: |
| 101 | + |
| 102 | +```shell |
| 103 | +kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.7.1/standard-install.yaml |
| 104 | +``` |
| 105 | + |
| 106 | +## Configuration |
| 107 | + |
| 108 | +The following tables lists the configurable parameters of the NGINX Kubernetes Gateway chart and their default values. |
| 109 | + |
| 110 | +|Parameter | Description | Default Value | |
| 111 | +| --- | --- | --- | |
| 112 | +|`nginxGateway.image.repository` | The repository for the NGINX Kubernetes Gateway image. | ghcr.io/nginxinc/nginx-kubernetes-gateway | |
| 113 | +|`nginxGateway.image.tag` | The tag for the NGINX Kubernetes Gateway image. | edge | |
| 114 | +|`nginxGateway.image.pullPolicy` | The `imagePullPolicy` for the NGINX Kubernetes Gateway image. | Always | |
| 115 | +|`nginxGateway.gatewayClassName` | The name of the GatewayClass for the NGINX Kubernetes Gateway deployment. | nginx | |
| 116 | +|`nginxGateway.gatewayControllerName` | The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain is k8s-gateway.nginx.org. | k8s-gateway.nginx.org/nginx-gateway-controller | |
| 117 | +|`nginx.image.repository` | The repository for the NGINX image. | nginx | |
| 118 | +|`nginx.image.tag` | The tag for the NGINX image. | 1.25 | |
| 119 | +|`nginx.image.pullPolicy` | The `imagePullPolicy` for the NGINX image. | Always | |
| 120 | +|`initContainer.image.repository` | The repository for the `initContainer` image. | busybox | |
| 121 | +|`initContainer.image.tag` | The tag for the `initContainer` image. | 1.36 | |
| 122 | +|`serviceAccount.annotations` | The `annotations` for the ServiceAccount used by the NGINX Kubernetes Gateway deployment. | {} | |
| 123 | +|`serviceAccount.name` | Name of the ServiceAccount used by the NGINX Kubernetes Gateway deployment. | Autogenerated | |
| 124 | +|`service.create` | Creates a service to expose the NGINX Kubernetes Gateway pods. | true | |
| 125 | +|`service.type` | The type of service to create for the NGINX Kubernetes Gateway. | Loadbalancer | |
| 126 | +|`service.externalTrafficPolicy` | The `externalTrafficPolicy` of the service. The value `Local` preserves the client source IP. | Local | |
| 127 | +|`service.annotations` | The `annotations` of the NGINX Kubernetes Gateway service. | {} | |
| 128 | +|`service.ports` | A list of ports to expose through the NGINX Kubernetes Gateway service. Update it to match the listener ports from your Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports. | [ port: 80, targetPort: 80, protocol: TCP, name: http; port: 443, targetPort: 443, protocol: TCP, name: https ] | |
0 commit comments