You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand documentation on the KubernetesImagesRepository setting.
Provide our users more help on this setting. Place the info in the
Kubernetes feature section, and link to it from the admin-settings
description for KubernetesImagesRepository.
Signed-off-by: Cesar Talledo <cesar.talledo@docker.com>
Copy file name to clipboardExpand all lines: content/manuals/desktop/features/kubernetes.md
+98-8
Original file line number
Diff line number
Diff line change
@@ -81,14 +81,6 @@ The following table summarizes this comparison.
81
81
| Works with containerd image store | Yes | Yes |
82
82
| Works with Docker image store | Yes | No |
83
83
84
-
### Additional settings
85
-
86
-
#### Viewing system containers
87
-
88
-
By default, Kubernetes system containers are hidden. To inspect these containers, enable **Show system containers (advanced)**.
89
-
90
-
You can now view the running Kubernetes containers with `docker ps` or in the Docker Desktop Dashboard.
91
-
92
84
## Using the kubectl command
93
85
94
86
Kubernetes integration automatically installs the Kubernetes CLI command
@@ -131,6 +123,104 @@ For more information about `kubectl`, see the
131
123
132
124
Kubernetes clusters are not automatically upgraded with Docker Desktop updates. To upgrade the cluster, you must manually select **Reset Kubernetes Cluster** in settings.
133
125
126
+
## Additional settings
127
+
128
+
### Viewing system containers
129
+
130
+
By default, Kubernetes system containers are hidden. To inspect these containers, enable **Show system containers (advanced)**.
131
+
132
+
You can now view the running Kubernetes containers with `docker ps` or in the Docker Desktop Dashboard.
133
+
134
+
### Configuring a custom image registry for Kubernetes control plane images
135
+
136
+
Docker Desktop uses containers to run the Kubernetes control plane. By default, Docker Desktop pulls
137
+
the associated container images from Docker Hub. The images pulled depend on the [cluster provisioning mode](#cluster-provisioning-method).
138
+
139
+
For example, in `kind` mode it requires the following images:
The image tags are automatically selected by Docker Desktop based on several
163
+
factors, including the version of Kubernetes being used. The tags vary for each image.
164
+
165
+
To accommodate scenarios where access to Docker Hub is not allowed, admins can
166
+
configure Docker Desktop to pull the above listed images from a different registry (e.g., a mirror)
167
+
using the [KubernetesImagesRepository](../../security/for-admins/hardened-desktop/settings-management/configure-json-file.md#kubernetes) setting as follows.
168
+
169
+
An image name can be broken into `[registry[:port]/][namespace/]repository[:tag]` components.
170
+
The `KubernetesImagesRepository` setting allows users to override the `[registry[:port]/][namespace]`
171
+
portion of the image's name.
172
+
173
+
For example, if Docker Desktop Kubernetes is configured in `kind` mode and
174
+
`KubernetesImagesRepository` is set to `my-registry:5000/kind-images`, then
These images should be cloned/mirrored from their respective images in Docker Hub. The tags must
184
+
also match what Docker Desktop expects.
185
+
186
+
The recommended approach to set this up is the following:
187
+
188
+
1) Start Docker Desktop.
189
+
190
+
2) In Settings > Kubernetes, enable the *Show system containers* setting.
191
+
192
+
3) In Settings > Kubernetes, start Kubernetes using the desired cluster provisioning method: `kubeadm` or `kind`.
193
+
194
+
4) Wait for Kubernetes to start.
195
+
196
+
5) Use `docker ps` to view the container images used by Docker Desktop for the Kubernetes control plane.
197
+
198
+
6) Clone or mirror those images (with matching tags) to your custom registry.
199
+
200
+
7) Stop the Kubernetes cluster.
201
+
202
+
8) Configure the `KubernetesImagesRepository` setting to point to your custom registry.
203
+
204
+
9) Restart Docker Desktop.
205
+
206
+
10) Verify that the Kubernetes cluster is using the custom registry images using the `docker ps` command.
207
+
208
+
> [!NOTE]
209
+
>
210
+
> The `KubernetesImagesRepository` setting only applies to control plane images used by Docker Desktop
211
+
> to set up the Kubernetes cluster. It has no effect on other Kubernetes pods.
212
+
213
+
> [!NOTE]
214
+
>
215
+
> When using `KubernetesImagesRepository` and [Enhanced Container Isolation (ECI)](../../security/for-admins/hardened-desktop/enhanced-container-isolation/_index.md)
216
+
> is enabled, add the following images to the [ECI Docker socket mount image list](../../security/for-admins/hardened-desktop/settings-management/configure-json-file.md#enhanced-container-isolation):
|`kubernetes`|| If `enabled` is set to true, a Kubernetes single-node cluster is started when Docker Desktop starts. If `showSystemContainers` is set to true, Kubernetes containers are displayed in the Docker Desktop Dashboard and when you run `docker ps`. `imagesRepository`lets you specify which repository Docker Desktop pulls the Kubernetes images from. For example, `"imagesRepository": "registry-1.docker.io/docker"`. ||
267
+
|`kubernetes`|| If `enabled` is set to true, a Kubernetes single-node cluster is started when Docker Desktop starts. If `showSystemContainers` is set to true, Kubernetes containers are displayed in the Docker Desktop Dashboard and when you run `docker ps`. The [imagesRepository](../../../../desktop/features/kubernetes.md#configuring-a-custom-image-registry-for-kubernetes-control-plane-images) setting lets you specify which repository Docker Desktop pulls control-plane Kubernetes images from. ||
268
268
269
269
> [!NOTE]
270
270
>
271
271
> When using the `imagesRepository` setting and Enhanced Container Isolation (ECI), add the following images to the [ECI Docker socket mount image list](#enhanced-container-isolation):
> These containers mount the Docker socket, so you must add the images to the ECI images list. If not, ECI will block the mount and Kubernetes won't start.
0 commit comments