Symptom
In the Docker Preferences options, “Enabel Kubernetes” is selected to enable Kubernetes, but it stays in the starting state and cannot be used normally.
Cause
To enable the Kubernetes feature, Docker needs to pull the Kubernetes-related images from an image registry.
Because access to Docker Hub is too slow from within China, the images cannot be pulled successfully, which leaves Kubernetes stuck in the starting state.
Solution
Step 1: Download the code from the repository https://github.com/hummerstudio/k8s-docker-desktop-for-mac to your local machine. You can run the following command directly in a 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 correctly:
cd k8s-docker-desktop-for-mac
sh load_images.sh