Skip to content

Commit db477e3

Browse files
balakoteswarmjang
andauthored
fix: updated the k8s documentation for NIM v2.19.0 release (#208)
* fix: updated the k8s documentation for NIM v2.19.0 release * fix: addressed review comments * fix: addressed review comments * Apply suggestions from code review --------- Co-authored-by: Mike Jang <3287976+mjang@users.noreply.github.com>
1 parent 5d129b1 commit db477e3

File tree

2 files changed

+84
-104
lines changed

2 files changed

+84
-104
lines changed

content/includes/nim/kubernetes/access-webui-helm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ You can access the NGINX Instance Manager web interface using the external IP ad
2323

2424
For example, `https://10.108.57.167/ui`.
2525

26-
This IP address might not be reachable, depending on how the Kubernetes cluster networking was configured. If so, the `apigw` service type can be changed to a more suitable option, such as `LoadBalancer`, by changing the [Configurable Helm Setting]({{< relref "/nim/deploy/kubernetes/helm-config-settings.md" >}}) value for `nms-hybrid.apigw.service.type` .
26+
This IP address might not be reachable, depending on how the Kubernetes cluster networking was configured. If so, the `apigw` service type can be changed to a more suitable option, such as `LoadBalancer`, by changing the [Configurable Helm Setting]({{< relref "/nim/deploy/kubernetes/helm-config-settings.md" >}}) value for `apigw.service.type`.

content/nim/deploy/kubernetes/deploy-using-helm.md

Lines changed: 83 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,30 @@ Create a Docker registry secret on the cluster, using the JWT token as the usern
5555

5656
- **Kubernetes**:
5757

58+
```shell
59+
kubectl create namespace nms
60+
```
61+
5862
```shell
5963
kubectl create secret docker-registry regcred \
6064
--docker-server=private-registry.nginx.com \
6165
--docker-username=<JWT Token> \
62-
--docker-password=none
66+
--docker-password=none \
67+
-n nms
6368
```
6469

6570
- **OpenShift**:
6671

72+
```shell
73+
oc new-project nms
74+
```
75+
6776
```shell
6877
oc create secret docker-registry regcred \
6978
--docker-server=private-registry.nginx.com \
7079
--docker-username=<JWT Token> \
71-
--docker-password=none
80+
--docker-password=none \
81+
-n nms
7282
```
7383

7484
{{< warning >}}
@@ -84,13 +94,13 @@ To confirm the secret is created:
8494
- **Kubernetes**:
8595

8696
```shell
87-
kubectl get secret regcred --output=yaml
97+
kubectl get secret regcred --output=yaml -n nms
8898
```
8999

90100
- **OpenShift**:
91101

92102
```shell
93-
oc get secret regcred --output=yaml
103+
oc get secret regcred --output=yaml -n nms
94104
```
95105

96106

@@ -127,37 +137,36 @@ The `values.yaml` file customizes the Helm chart installation without modifying
127137
{{< see-also >}} For details on creating a secret, see Kubernetes [Pull an Image from a Private Registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). {{</ see-also >}}
128138

129139
```yaml
130-
nms-hybrid:
131-
imagePullSecrets:
132-
- name: regcred
133-
apigw:
134-
image:
135-
repository: private-registry.nginx.com/nms/apigw
136-
tag: <version>
137-
core:
138-
image:
139-
repository: private-registry.nginx.com/nms/core
140-
tag: <version>
141-
dpm:
142-
image:
143-
repository: private-registry.nginx.com/nms/dpm
144-
tag: <version>
145-
ingestion:
146-
image:
147-
repository: private-registry.nginx.com/nms/ingestion
148-
tag: <version>
149-
integrations:
150-
image:
151-
repository: private-registry.nginx.com/nms/integrations
152-
tag: <version>
153-
secmon:
154-
image:
155-
repository: private-registry.nginx.com/nms/secmon
156-
tag: <version>
157-
utility:
158-
image:
159-
repository: private-registry.nginx.com/nms/utility
160-
tag: <version>
140+
imagePullSecrets:
141+
- name: regcred
142+
apigw:
143+
image:
144+
repository: private-registry.nginx.com/nms/apigw
145+
tag: <version>
146+
core:
147+
image:
148+
repository: private-registry.nginx.com/nms/core
149+
tag: <version>
150+
dpm:
151+
image:
152+
repository: private-registry.nginx.com/nms/dpm
153+
tag: <version>
154+
ingestion:
155+
image:
156+
repository: private-registry.nginx.com/nms/ingestion
157+
tag: <version>
158+
integrations:
159+
image:
160+
repository: private-registry.nginx.com/nms/integrations
161+
tag: <version>
162+
secmon:
163+
image:
164+
repository: private-registry.nginx.com/nms/secmon
165+
tag: <version>
166+
utility:
167+
image:
168+
repository: private-registry.nginx.com/nms/utility
169+
tag: <version>
161170
```
162171
163172
2. Save and close the `values.yaml` file.
@@ -169,65 +178,24 @@ The `values.yaml` file customizes the Helm chart installation without modifying
169178
If deploying on OpenShift, include this setting in the `values.yaml` file:
170179

171180
```yaml
172-
nms-hybrid:
173-
openshift:
174-
enabled: true
181+
openshift:
182+
enabled: true
175183
```
176184

177185
### How OpenShift handles security constraints
178186

179187
When `openshift.enabled: true` is set in the `values.yaml` file, the NGINX Instance Manager deployment automatically creates a **custom Security Context Constraint (SCC)** and links it to the Service Account used by all pods.
180188

181-
By default, OpenShift enforces strict security policies that require containers to run as **non-root** users. The NGINX Instance Manager deployment needs specific user IDs (UIDs) for certain services, such as **1000** for `nms` and **101** for `nginx` and `clickhouse`. Since the default SCCs do not allow these UIDs, a **custom SCC** is created. This ensures that the deployment can run with the necessary permissions while maintaining OpenShift’s security standards.
189+
By default, OpenShift enforces strict security policies that require containers to run as **non-root** users. The NGINX Instance Manager deployment needs specific user IDs (UIDs) for certain services, such as **1000** for `nms` and **101** for `nginx` and `clickhouse`. Since the default SCCs do not allow these UIDs, a **custom SCC** is created. This ensures that the deployment can run with the necessary permissions while maintaining OpenShift’s security standards. The custom SCC allows these UIDs by setting the `runAsUser` field, which controls which users can run containers.
190+
191+
{{< note >}} If you’re encountering errors with the custom [Security Context Constraints](https://docs.redhat.com/en/documentation/openshift_container_platform/4.15/html/authentication_and_authorization/managing-pod-security-policies), you may not have permissions to access the Security Context Constraints resource. Please contact a Cluster Administrator to request access, either through a cluster role binding or by adjusting your user role. {{< /note >}}
182192

183-
The custom SCC allows these UIDs by setting the `runAsUser` field, which controls which users can run containers. To verify that the SCC has been created, run:
193+
To verify that the custom SCC has been created, after installing the helm chart, run:
184194

185195
```shell
186196
oc get scc nms-restricted-v2-scc --output=yaml
187197
```
188198

189-
190-
---
191-
192-
193-
To apply network policies for NGINX Instance Manager, ensure Kubernetes has a [network plugin](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) installed before the Helm chart installation.
194-
195-
By default, the following network policies will be created in the release namespace:
196-
197-
- **Kubernetes**:
198-
199-
```shell
200-
kubectl get netpol -n nms
201-
```
202-
203-
- **OpenShift**:
204-
205-
```shell
206-
oc get netpol -n nms
207-
```
208-
209-
**Output**
210-
211-
```text
212-
NAME POD-SELECTOR AGE
213-
apigw app.kubernetes.io/name=apigw 4m47s
214-
clickhouse app.kubernetes.io/name=clickhouse 4m47s
215-
core app.kubernetes.io/name=core 4m47s
216-
dpm app.kubernetes.io/name=dpm 4m47s
217-
ingestion app.kubernetes.io/name=ingestion 4m47s
218-
integrations app.kubernetes.io/name=integrations 4m47s
219-
secmon app.kubernetes.io/name=secmon 4m47s
220-
utility app.kubernetes.io/name=integrations 4m47s
221-
```
222-
223-
To disable network policies, update the `values.yaml` file:
224-
225-
```yaml
226-
networkPolicies:
227-
# Set this to true to enable network policies for NGINX Instance Manager.
228-
enabled: false
229-
```
230-
231199
---
232200

233201
## Install the chart
@@ -239,19 +207,19 @@ Run the `helm install` command to deploy NGINX Instance Manager:
239207

240208
{{< important >}} Remember to save the password for future use. Only the encrypted password is stored, and there's no way to recover or reset it if lost. {{< /important >}}
241209

242-
(Optional) Replace `<nms-chart-version>` with the desired chart version. If omitted, the latest version will be installed.
210+
(Optional) Replace `<chart-version>` with the desired chart version. If omitted, the latest version will be installed. Currently only version 2.19.0 is supported.
243211

244212
```shell
245213
helm install -n nms \
246-
--set nms-hybrid.adminPasswordHash=$(openssl passwd -6 'YourPassword123#') \
247-
nms nginx-stable/nms \
214+
--set adminPasswordHash=$(openssl passwd -6 'YourPassword123#') \
215+
nms nginx-stable/nms-hybrid \
248216
--create-namespace \
249217
-f <path-to-your-values.yaml> \
250218
[--version <chart-version>] \
251219
--wait
252220
```
253221

254-
To help you choose the right NGINX Instance Manager chart version, see the table in:
222+
To help you choose the right NGINX Instance Manager chart version, see the following table (through version v2.18.0):
255223

256224
{{< include "nim/kubernetes/nms-chart-supported-module-versions.md" >}}
257225

@@ -289,14 +257,16 @@ To upgrade:
289257

290258
1. [Update the Helm repository list](#add-helm-repository).
291259
1. [Adjust your `values.yaml` file](#create-a-helm-deployment-values.yaml-file) if needed.
292-
1. To upgrade the NGINX instance deployment, run the following command. This command updates the `nms` deployment with a new version from the `nginx-stable/nms` repository. It also hashes the provided password and uses the `values.yaml` file at the path you specify.
260+
1. To upgrade the NGINX Instance Manager deployment, run the following command. This command updates the `nms` deployment with a new version from the `nginx-stable/nms-hybrid` repository. It also hashes the provided password and uses the `values.yaml` file at the path you specify.
261+
262+
(Optional) Replace `<chart-version>` with the desired chart version. If omitted, the latest version will be installed. Currently only version 2.19.0 is supported.
293263

294264
```bash
295265
helm upgrade -n nms \
296-
--set nms-hybrid.adminPasswordHash=$(openssl passwd -6 'YourPassword123#') \
297-
nms nginx-stable/nms \
266+
--set adminPasswordHash=$(openssl passwd -6 'YourPassword123#') \
267+
nms nginx-stable/nms-hybrid \
298268
-f <path-to-your-values.yaml> \
299-
[--version <nms-chart-version>] \
269+
[--version <chart-version>] \
300270
--wait
301271
```
302272

@@ -327,20 +297,30 @@ To apply network policies for NGINX Instance Manager, ensure Kubernetes has a [n
327297

328298
By default, the following network policies will be created in the release namespace:
329299

330-
```shell
331-
kubectl get netpol -n nms
332-
```
300+
- **Kubernetes**:
333301

334-
```text
335-
NAME POD-SELECTOR AGE
336-
apigw app.kubernetes.io/name=apigw 4m47s
337-
clickhouse app.kubernetes.io/name=clickhouse 4m47s
338-
core app.kubernetes.io/name=core 4m47s
339-
dpm app.kubernetes.io/name=dpm 4m47s
340-
ingestion app.kubernetes.io/name=ingestion 4m47s
341-
integrations app.kubernetes.io/name=integrations 4m47s
342-
utility app.kubernetes.io/name=integrations 4m47s
343-
```
302+
```shell
303+
kubectl get netpol -n nms
304+
```
305+
306+
- **OpenShift**:
307+
308+
```shell
309+
oc get netpol -n nms
310+
```
311+
**Output**:
312+
313+
```text
314+
NAME POD-SELECTOR AGE
315+
apigw app.kubernetes.io/name=apigw 4m47s
316+
clickhouse app.kubernetes.io/name=clickhouse 4m47s
317+
core app.kubernetes.io/name=core 4m47s
318+
dpm app.kubernetes.io/name=dpm 4m47s
319+
ingestion app.kubernetes.io/name=ingestion 4m47s
320+
integrations app.kubernetes.io/name=integrations 4m47s
321+
secmon app.kubernetes.io/name=secmon 4m47s
322+
utility app.kubernetes.io/name=integrations 4m47s
323+
```
344324

345325
To disable network policies, update the `values.yaml` file:
346326

0 commit comments

Comments
 (0)