@@ -49,7 +49,7 @@ To build an NGINX Kubernetes Gateway container image from source run the followi
49
49
make TAG=$(whoami) container
50
50
```
51
51
52
- This will build the docker image and tag it with your user ID, e.g. `docker.io/library/ nginx-kubernetes-gateway:user`
52
+ This will build the docker image ` nginx-kubernetes-gateway:<your- user>`.
53
53
54
54
## Deploy on Kind
55
55
@@ -59,23 +59,23 @@ This will build the docker image and tag it with your user ID, e.g. `docker.io/l
59
59
make create-kind-cluster
60
60
```
61
61
62
- 2. Build the NKG image and load it onto your `kind` cluster:
62
+ 2. Load the previously built image onto your `kind` cluster:
63
63
64
64
```shell
65
- make TAG=$(whoami) container
66
- kind load docker-image docker.io/library/nginx-kubernetes-gateway:$(whoami)
65
+ kind load docker-image nginx-kubernetes-gateway:$(whoami)
67
66
```
68
67
69
68
3. Modify the image name and image pull policy for the `nginx-gateway` container in the
70
- NKG [deployment manifest](/deploy/manifests/nginx-gateway.yaml). Set the image name to the image you built in
71
- the previous step and the image pull policy to `Never`. Once the changes are made, follow
69
+ NKG [deployment manifest](/deploy/manifests/deployment.yaml). Set the image name to the image you built in
70
+ the previous step and the image pull policy to `IfNotPresent`, so that Kubernetes will not try to pull it from
71
+ the DockerHub. Once the changes are made, follow
72
72
the [installation instructions](/docs/installation.md) to install NKG on your `kind` cluster.
73
73
74
74
Alternatively, you can update the image name and pull policy by using the following command when applying
75
- `nginx-gateway .yaml`:
75
+ `deployment .yaml`:
76
76
77
77
```shell
78
- cat deploy/manifests/nginx-gateway .yaml | sed "s|image: ghcr.io/nginxinc/nginx-kubernetes-gateway.*|image: docker.io/library/ nginx-kubernetes-gateway:<YOUR-TAG> |" | sed "s|imagePullPolicy: Always|imagePullPolicy: Never |" | kubectl apply -f -
78
+ cat deploy/manifests/deployment .yaml | sed "s|image: ghcr.io/nginxinc/nginx-kubernetes-gateway.*|image: nginx-kubernetes-gateway:$(whoami) |" | sed "s|imagePullPolicy: Always|imagePullPolicy: IfNotPresent |" | kubectl apply -f -
79
79
```
80
80
81
81
### Run Examples
0 commit comments