Skip to content

Commit cbbef0e

Browse files
committed
feat: Update Helm IA for add image to cluster
1 parent a039bc8 commit cbbef0e

File tree

1 file changed

+85
-76
lines changed

1 file changed

+85
-76
lines changed

content/nic/installation/nic-images/add-image-to-cluster.md

Lines changed: 85 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,65 @@ You can also get the NGINX Ingress Controller image using the following alternat
2121
- [Build NGINX Ingress Controller]({{< ref "/nic/installation/build-nginx-ingress-controller.md" >}})
2222
- For NGINX Open Source, you can pull the [nginx/nginx-ingress image](https://hub.docker.com/r/nginx/nginx-ingress/) from DockerHub
2323

24-
## Helm Deployment
24+
## Helm deployments
2525

26-
If you are using Helm for deployment, there are two main methods: using *sources* or *charts*.
26+
If you are using Helm for deployment, there are two main methods: using a _chart_ or _source_.
2727

28-
### Helm Source
28+
### Add the image from chart
2929

30-
The [Installation with Helm ]({{< ref "/nic/installation/installing-nic/installation-with-helm.md#managing-the-chart-via-sources" >}}) documentation has a section describing how to use sources: these are the unique steps for Docker secrets using JWT tokens.
30+
The following command installs NGINX Ingress Controller with a Helm chart, passing required arguments using the `set` parameter.
31+
32+
```shell
33+
helm install my-release -n nginx-ingress oci://ghcr.io/nginx/charts/nginx-ingress --version {{< nic-helm-version >}} --set controller.image.repository=private-registry.nginx.com/nginx-ic/nginx-plus-ingress --set controller.image.tag={{< nic-version >}} --set controller.nginxplus=true --set controller.serviceAccount.imagePullSecretName=regcred
34+
```
35+
36+
You can also use the certificate and key from the MyF5 portal and the Docker registry API to list the available image tags for the repositories, for example:
37+
38+
```shell
39+
curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
40+
```
41+
```text
42+
{
43+
"name": "nginx-ic/nginx-plus-ingress",
44+
"tags": [
45+
"{{< nic-version >}}-alpine",
46+
"{{< nic-version >}}-alpine-fips",
47+
"{{< nic-version >}}-ubi",
48+
"{{< nic-version >}}"
49+
]
50+
}
51+
```
52+
53+
```shell
54+
curl https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
55+
```
56+
```text
57+
{
58+
"name": "nginx-ic-nap/nginx-plus-ingress",
59+
"tags": [
60+
"{{< nic-version >}}-alpine-fips",
61+
"{{< nic-version >}}-ubi",
62+
"{{< nic-version >}}"
63+
]
64+
}
65+
```
66+
67+
```shell
68+
$ curl https://private-registry.nginx.com/v2/nginx-ic-dos/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
69+
```
70+
```text
71+
{
72+
"name": "nginx-ic-dos/nginx-plus-ingress",
73+
"tags": [
74+
"{{< nic-version >}}-ubi",
75+
"{{< nic-version >}}"
76+
]
77+
}
78+
```
79+
80+
### Add the image from source
81+
82+
The [Installation with Helm]({{< ref "/nic/installation/installing-nic/installation-with-helm.md#install-the-helm-chart-from-source" >}}) documentation has a section describing how to use sources: these are the unique steps for Docker secrets using JWT tokens.
3183

3284
1. Clone the NGINX [`kubernetes-ingress` repository](https://github.com/nginx/kubernetes-ingress).
3385
1. Navigate to the `charts/nginx-ingress` folder of your local clone.
@@ -37,36 +89,36 @@ The [Installation with Helm ]({{< ref "/nic/installation/installing-nic/installa
3789

3890
1. Change the `nginxplus` argument to `true`.
3991
1. Change the `repository` argument to the NGINX Ingress Controller image you intend to use.
40-
2. Add an argument to `imagePullSecretName` or `imagePullSecretsNames` to allow Docker to pull the image from the private registry.
41-
42-
The following code block shows snippets of the parameters you will need to change, and an example of their contents:
43-
44-
```yaml
45-
## Deploys the Ingress Controller for NGINX Plus
46-
nginxplus: true
47-
## Truncated fields
48-
## ...
49-
## ...
50-
image:
51-
## The image repository for the desired NGINX Ingress Controller image
52-
repository: private-registry.nginx.com/nginx-ic/nginx-plus-ingress
53-
54-
## The version tag
55-
tag: {{< nic-version >}}
56-
57-
serviceAccount:
58-
## The annotations of the service account of the Ingress Controller pods.
59-
annotations: {}
92+
1. Add an argument to `imagePullSecretName` or `imagePullSecretsNames` to allow Docker to pull the image from the private registry.
6093

61-
## Truncated fields
62-
## ...
63-
## ...
94+
The following code block shows snippets of the parameters you will need to change, and an example of their contents:
6495

65-
## The name of the secret containing docker registry credentials.
66-
## Secret must exist in the same namespace as the helm release.
67-
## Note that also imagePullSecretsNames can be used here if multiple secrets need to be set.
68-
imagePullSecretName: regcred
69-
```
96+
```yaml
97+
## Deploys the Ingress Controller for NGINX Plus
98+
nginxplus: true
99+
## Truncated fields
100+
## ...
101+
## ...
102+
image:
103+
## The image repository for the desired NGINX Ingress Controller image
104+
repository: private-registry.nginx.com/nginx-ic/nginx-plus-ingress
105+
106+
## The version tag
107+
tag: {{< nic-version >}}
108+
109+
serviceAccount:
110+
## The annotations of the service account of the Ingress Controller pods.
111+
annotations: {}
112+
113+
## Truncated fields
114+
## ...
115+
## ...
116+
117+
## The name of the secret containing docker registry credentials.
118+
## Secret must exist in the same namespace as the helm release.
119+
## Note that also imagePullSecretsNames can be used here if multiple secrets need to be set.
120+
imagePullSecretName: regcred
121+
```
70122
71123
With the modified `values.yaml` file, you can now use Helm to install NGINX Ingress Controller, for example:
72124

@@ -78,50 +130,7 @@ The above command will install NGINX Ingress Controller in the `nginx-ingress` n
78130

79131
If the namespace does not exist, `--create-namespace` will create it. Using `-f values.yaml` tells Helm to use the `values.yaml` file that you modified earlier with the settings you want to apply for your NGINX Ingress Controller deployment.
80132

81-
82-
### Helm Chart
83-
84-
If you want to install NGINX Ingress Controller using the charts method, the following is an example of using the command line to pass the required arguments using the `set` parameter.
85-
86-
```shell
87-
helm install my-release -n nginx-ingress oci://ghcr.io/nginx/charts/nginx-ingress --version {{< nic-helm-version >}} --set controller.image.repository=private-registry.nginx.com/nginx-ic/nginx-plus-ingress --set controller.image.tag={{< nic-version >}} --set controller.nginxplus=true --set controller.serviceAccount.imagePullSecretName=regcred
88-
```
89-
You can also use the certificate and key from the MyF5 portal and the Docker registry API to list the available image tags for the repositories, for example:
90-
91-
```shell
92-
$ curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
93-
94-
{
95-
"name": "nginx-ic/nginx-plus-ingress",
96-
"tags": [
97-
"{{< nic-version >}}-alpine",
98-
"{{< nic-version >}}-alpine-fips",
99-
"{{< nic-version >}}-ubi",
100-
"{{< nic-version >}}"
101-
]
102-
}
103-
104-
$ curl <https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tags/list> --key <path-to-client.key> --cert <path-to-client.cert> | jq
105-
{
106-
"name": "nginx-ic-nap/nginx-plus-ingress",
107-
"tags": [
108-
"{{< nic-version >}}-alpine-fips",
109-
"{{< nic-version >}}-ubi",
110-
"{{< nic-version >}}"
111-
]
112-
}
113-
114-
$ curl <https://private-registry.nginx.com/v2/nginx-ic-dos/nginx-plus-ingress/tags/list> --key <path-to-client.key> --cert <path-to-client.cert> | jq
115-
{
116-
"name": "nginx-ic-dos/nginx-plus-ingress",
117-
"tags": [
118-
"{{< nic-version >}}-ubi",
119-
"{{< nic-version >}}"
120-
]
121-
}
122-
```
123-
124-
## Manifest Deployment
133+
## Manifest deployment
125134

126135
The page ["Installation with Manifests"]({{< ref "/nic/installation/installing-nic/installation-with-manifests.md" >}}) explains how to install NGINX Ingress Controller using manifests. The following snippet is an example of a deployment:
127136

0 commit comments

Comments
 (0)