Home Explore Blog CI



docker

5th chunk of `content/manuals/desktop/features/kubernetes.md`
8c367ccf97330e531afbdcfd2a58c49384014d7ab7fe91d00000000100000c79
my-registry:5000/kind-images/node:<tag>
my-registry:5000/kind-images/envoy:<tag>
my-registry:5000/kind-images/desktop-cloud-provider-kind:<tag>
my-registry:5000/kind-images/desktop-containerd-registry-mirror:<tag>
```

These images should be cloned/mirrored from their respective images in Docker Hub. The tags must
also match what Docker Desktop expects.

The recommended approach to set this up is the following:

1) Start Docker Desktop.

2) In Settings > Kubernetes, enable the *Show system containers* setting.

3) In Settings > Kubernetes, start Kubernetes using the desired cluster provisioning method: `kubeadm` or `kind`.

4) Wait for Kubernetes to start.

5) Use `docker ps` to view the container images used by Docker Desktop for the Kubernetes control plane.

6) Clone or mirror those images (with matching tags) to your custom registry.

7) Stop the Kubernetes cluster.

8) Configure the `KubernetesImagesRepository` setting to point to your custom registry.

9) Restart Docker Desktop.

10) Verify that the Kubernetes cluster is using the custom registry images using the `docker ps` command.

> [!NOTE]
>
> The `KubernetesImagesRepository` setting only applies to control plane images used by Docker Desktop
> to set up the Kubernetes cluster. It has no effect on other Kubernetes pods.

> [!NOTE]
>
> When using `KubernetesImagesRepository` and [Enhanced Container Isolation (ECI)](../../security/for-admins/hardened-desktop/enhanced-container-isolation/_index.md)
> 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):
>
> * [imagesRepository]/desktop-cloud-provider-kind:*
> * [imagesRepository]/desktop-containerd-registry-mirror:*
>
> 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.

## Troubleshooting

- If Kubernetes fails to start, make sure Docker Desktop is running with enough allocated resources. Check **Settings** > **Resources**.
- If the `kubectl` commands return errors, confirm the context is set to `docker-desktop`
   ```console
   $ kubectl config use-context docker-desktop
   ```
   You can then try checking the logs of the [Kubernetes system containers](#viewing-system-containers) if you have enabled that setting.
- If you're experiencing cluster issues after updating, reset your Kubernetes cluster. Resetting a Kubernetes cluster can help resolve issues by essentially reverting the cluster to a clean state, and clearing out misconfigurations, corrupted data, or stuck resources that may be causing problems. If the issue still persists, you may need to clean and purge data, and then restart Docker Desktop.

## Turn off and uninstall Kubernetes

To turn off Kubernetes in Docker Desktop:

1. From the Docker Desktop Dashboard, select the **Settings** icon.
2. Select the **Kubernetes** tab.
3. Deselect the **Enable Kubernetes** checkbox.
4. Select **Apply & Restart** to save the settings. This stops and removes Kubernetes containers, and also removes the `/usr/local/bin/kubectl` command.

Title: Completing Custom Image Registry Configuration, Troubleshooting, and Uninstalling Kubernetes
Summary
This section completes the instructions for configuring Docker Desktop to use a custom image registry for Kubernetes control plane images, including verifying the configuration and addressing specific considerations for Enhanced Container Isolation (ECI). It provides troubleshooting tips such as checking resource allocation, verifying `kubectl` context, and resetting the cluster after updates. Finally, it explains how to disable and uninstall Kubernetes from Docker Desktop.