generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 121
Add document for installing NGF on OpenShift through OperatorHub #1332
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
+190
−1
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
de86f56
Update compability doc (#1054)
sarthyparty ecb9222
NGF: Update gateway addresses compatibility document (#1109)
bjee19 29a305d
NGF: Update gateway addresses compatibility document with IP family c…
bjee19 8d59f42
New NGF CLI parameter for Trial period enforcement (#1128)
tataruty bf2aedf
Merge branch 'main' into ngf-release-2.2
ADubhlaoich 6822326
RouteRules and Gateway unsupported fields update (#1268)
tataruty 4b0aa63
NGF: Update advanced routing guide for Regex PathType (#1286)
ciarams87 56d6dce
Merge branch 'main' into ngf-release-2.2
ADubhlaoich 2138ce5
Add details on BuildOS and InferencePoolCount to Product Telemetry do…
shaun-nx d67906e
Merge branch 'main' into ngf-release-2.2
ADubhlaoich a03edd0
Add document for installing NGF on Openshift through OperatorHub
shaun-nx 61fc33b
Merge branch 'main' into ngf/openshift-install
shaun-nx f075835
Merge branch 'main' into ngf/openshift-install
ADubhlaoich 3b76707
Merge branch 'main' into ngf/openshift-install
ADubhlaoich b700813
Merge branch 'main' into ngf/openshift-install
ADubhlaoich b49beab
Merge branch 'main' into ngf/openshift-install
shaun-nx 020f81c
Update docs to be in line with style guidelins
shaun-nx 892135f
Code review updates
shaun-nx f0e129c
Update document to follow "How-to-guide" format
shaun-nx 6cd31ce
Replace `bash` with `shell`
shaun-nx e5642d8
Fix pre-commit errors
shaun-nx 0c077c7
Fix pre-commit errors
shaun-nx df1dd08
Update content/ngf/install/openshift.md
shaun-nx 206474c
Style updates
shaun-nx 481f9b4
Revert changes to go.mod and go.sum
shaun-nx c4dd1f5
Merge branch 'main' into ngf/openshift-install
shaun-nx cbfb720
Remove `results` comment
shaun-nx 4280760
Merge branch 'main' into ngf/openshift-install
shaun-nx 78709b9
Fix go.sum
shaun-nx 5ef0e01
Update go mod and sum
shaun-nx 4a41265
Add new line
shaun-nx 483a38d
Update steps for creating the NginxGatewayFabric resource
shaun-nx b1463fd
Adjust headers and numbered lists
shaun-nx 4a3b702
Update content/ngf/install/openshift.md
shaun-nx c9781e7
Merge branch 'main' into ngf/openshift-install
shaun-nx 7f1384a
Update sections for N1 console and licensing configuation
shaun-nx 96f5e0a
Merge branch 'main' into ngf/openshift-install
shaun-nx ed21d90
Update references
shaun-nx 89119a8
Move red hat gatalog to top of references
shaun-nx 702ea4f
Merge branch 'main' into ngf/openshift-install
shaun-nx 742dbbe
Merge branch 'main' into ngf/openshift-install
shaun-nx c4ba521
Remove nd-docs
shaun-nx ecc8bba
Merge branch 'main' into ngf/openshift-install
shaun-nx 140e081
Merge branch 'main' into ngf/openshift-install
shaun-nx 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,6 +1,6 @@ | ||
| --- | ||
| title: Build NGINX Gateway Fabric | ||
| weight: 400 | ||
| weight: 500 | ||
| toc: true | ||
| nd-content-type: how-to | ||
| nd-product: NGF | ||
|
|
||
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,189 @@ | ||
| --- | ||
| title: Install NGINX Gateway Fabric on OpenShift | ||
| description: Deploy F5 NGINX Gateway Fabric on Red Hat OpenShift through OperatorHub and configure it using the NginxGatewayFabric custom resource. | ||
| weight: 400 | ||
| toc: true | ||
| nd-content-type: how-to | ||
| nd-product: NGF | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| This guide details how to install F5 NGINX Gateway Fabric on Red Hat OpenShift through OperatorHub. You can then configure it with the `NginxGatewayFabric` custom resource. | ||
|
|
||
| ## Before you begin | ||
|
|
||
| Before starting, we recommend you have the following: | ||
|
|
||
| - A running Red Hat OpenShift cluster with cluster administrator privileges. | ||
| - Ability to pull images from `ghcr.io` (or a mirrored registry if required by your environment). | ||
|
|
||
| - Optional integrations | ||
| - F5 NGINX One dataplane API key if you plan to integrate with [F5 NGINX One Console](https://docs.nginx.com/nginx-one/). | ||
| - F5 NGINX Plus entitlements if you plan to run NGINX Gateway Fabric with F5 NGINX Plus. | ||
|
|
||
| NGINX Gateway Fabric provides first-class OpenShift support with Universal Base Image (UBI)-based images. Use the `-ubi` tags shown in the custom resource definition (CRD) examples. Defaults are compatible with OpenShift Security Context Constraints (SCCs) for non-root operation. If your cluster enforces custom SCCs or policies, bind the appropriate SCC to NGINX Gateway Fabric service accounts. | ||
|
|
||
| This section covers the necessary steps to have NGINX Gateway Fabric fully running in an OpenShift environment when installing through the OperatorHub | ||
|
|
||
| ## Install NGINX Gateway Fabric Operator from OperatorHub | ||
|
|
||
| 1. Navigate to the Red Hat Catalog: https://catalog.redhat.com/en | ||
| 1. Search for "NGINX Gateway Fabric Operator" in the searchbar at the top | ||
| 1. Select NGINX Gateway Fabric Operator | ||
| 1. Select **Deploy & use** | ||
| 1. Choose the appropriate architecture and release tag | ||
| 1. Complete the installation. Wait until the Operator status shows Installed | ||
|
|
||
| ## Create a project | ||
|
|
||
| In your cluster, create a dedicated project (namespace) for NGINX Gateway Fabric components. | ||
|
|
||
| ```shell | ||
| oc new-project nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| ## Create TLS secrets for internal communication (optional) | ||
|
|
||
| If you want NGINX Gateway Fabric to auto-generate internal certificates, skip this step. To provide your own TLS secrets, create the following: | ||
|
|
||
| Agent TLS (used by internal agent) | ||
|
|
||
| ```shell | ||
| oc create secret tls agent-tls \ | ||
| --cert=agent.crt \ | ||
| --key=agent.key \ | ||
| -n nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| Server TLS (used by internal server) | ||
|
|
||
| ```shell | ||
| oc create secret tls server-tls \ | ||
| --cert=server.crt \ | ||
| --key=server.key \ | ||
| -n nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| ## Create the NginxGatewayFabric custom resource | ||
|
|
||
| 1. Navigate to the "Installed Operators" section and select the "NGINX Gateway Fabric" Operator | ||
| 1. To create a new `NginxGatewayFabric` resource, select the tab labeled "NginxGatewayFabric" | ||
| 1. Next, select "Create NginxGatewayFabric" | ||
| 1. In this menue you will see "Forum view" and "YAML view". Select "YAML view" | ||
| 1. You will now see a YAML configuration for the `NginxGatewayFabric` resource | ||
| 1. Near the bottom, press the "Create" button | ||
|
|
||
| ## Integrate with NGINX One Console (optional) | ||
|
|
||
| If you want to use NGINX One Console to monitor NGINX Gateway Fabric, create a secret for the dataplane key (replace VALUE with your key). | ||
bjee19 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```shell | ||
| oc create secret generic nginxone-dataplane-key \ | ||
| --from-literal=key=VALUE \ | ||
| -n nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| Reference this secret in `spec.nginx.nginxOneConsole.dataplaneKeySecretName` in your `NginxGatewayFabric` resource. | ||
|
|
||
| ## Configure NGINX Plus licensing (optional) | ||
|
|
||
| If you plan to use NGINX Plus, set `spec.nginx.plus: true` in your `NginxGatewayFabric` resource. Add image pull credentials, and create a license secret if needed. | ||
|
|
||
| Example license secret name referenced by `usage.secretName` | ||
|
|
||
| ```shell | ||
| oc create secret generic nplus-license \ | ||
| --from-file=nginx-repo.crt=/path/to/nginx-repo.crt \ | ||
| --from-file=nginx-repo.key=/path/to/nginx-repo.key \ | ||
| -n nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| ## Configure exposure options for OpenShift (optional) | ||
|
|
||
| Choose one exposure option: | ||
|
|
||
| If a LoadBalancer is available, set `spec.nginx.service.type: LoadBalancer`. Optionally set: | ||
|
|
||
| - `externalTrafficPolicy: Local` to preserve client source IPs. | ||
| - `loadBalancerClass`, `loadBalancerIP`, and `loadBalancerSourceRanges` per your environment. | ||
|
|
||
| If a LoadBalancer is not available, set `spec.nginx.service.type: NodePort`, then create an OpenShift Route to the NGINX Gateway Fabric front-end Service (for HTTP/HTTPS traffic): | ||
|
|
||
| ```shell | ||
| oc create route edge ngf \ | ||
| --service=nginx-gateway-fabric-nginx \ | ||
| --port=http \ | ||
| -n nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| For TLS passthrough, add `--passthrough` and target the appropriate Service port. | ||
|
|
||
| ## Validate the installation | ||
|
|
||
| Verify that deployments and services are running, and confirm the GatewayClass: | ||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```shell | ||
| oc get pods -n nginx-gateway-fabric | ||
| oc get svc -n nginx-gateway-fabric | ||
| oc get gatewayclass | ||
| ``` | ||
|
|
||
| If troubleshooting is required, review logs | ||
|
|
||
| Controller logs | ||
|
|
||
| ```shell | ||
| oc logs deploy/ngf-nginx-gateway -n nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| Data plane logs | ||
|
|
||
| ```shell | ||
| oc logs deploy/ngf-nginx -n nginx-gateway-fabric | ||
| ``` | ||
|
|
||
| ## Perform a functional check (optional) | ||
|
|
||
| Create a Gateway and HTTPRoute to validate routing: | ||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```yaml | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| name: http | ||
| namespace: nginx-gateway-fabric | ||
| spec: | ||
| gatewayClassName: nginx | ||
| listeners: | ||
| - name: http | ||
| port: 80 | ||
| protocol: HTTP | ||
| hostname: example.com | ||
| allowedRoutes: | ||
| namespaces: | ||
| from: Same | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: echo | ||
| namespace: nginx-gateway-fabric | ||
| spec: | ||
| parentRefs: | ||
| - name: http | ||
| hostnames: | ||
| - example.com | ||
| rules: | ||
| - backendRefs: | ||
| - name: echo | ||
| port: 8080 | ||
| ``` | ||
|
|
||
| Ensure you have a Service and Deployment named `echo` that expose port 8080. If you are using a LoadBalancer Service, send a request to the load balancer IP address. Otherwise, use an OpenShift Route as configured. | ||
|
|
||
| ## See also | ||
|
|
||
| - [Red Hat Catalog](https://catalog.redhat.com/en) | ||
| - [Install NGINX Gateway Fabric with Helm]({{< ref "/ngf/install/helm.md" >}}) | ||
| - [Secure certificates for NGINX Gateway Fabric]({{< ref "/ngf/install/secure-certificates.md" >}}) | ||
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.