Symptoms
With “Enabel Kubernetes” checked in the Docker Preferences to enable K8S, it stays in the starting state and never becomes usable.
Cause
To enable the Kubernetes feature, Docker needs to pull the Kubernetes-related images from an image registry.
Because accessing Docker Hub from China is too slow, the images cannot be pulled successfully, which leaves Kubernetes stuck in the starting state.
Solution
Step 1: Download the code of the repository https://github.com/hummerstudio/k8s-docker-desktop-for-mac to your local machine; you can run the following command directly in the terminal:
git clone git@github.com:hummerstudio/k8s-docker-desktop-for-mac.git
Step 2: Run the load_images.sh script in the root directory and the images will download normally:
cd k8s-docker-desktop-for-mac
sh load_images.sh