When I tried to use docker desktop kubernetes in accordance with the reference book on a Windows 10 pro machine, the following error occurred in the command kubetcl cluster-info
.
Unable to connect to the server:Service Unavailable
kubectl config view
results were as follows:
apiVersion:v1
clusters:
- cluster:
certificate-authority-data —DATA+OMITTED
server:https://kubernetes.docker.internal:6443
name —docker-desktop
contexts:
- context:
cluster —docker-desktop
user —docker-desktop
name —docker-desktop
- context:
cluster —docker-desktop
user —docker-desktop
name —docker-for-desktop
current-context —docker-desktop
kind—Config
preferences:{}
users:
- name —docker-desktop
user:
client-certificate-data —REDACTED
client-key-data —REDACTED
I searched online and tried the following, but it didn't work.
Delete docker images, containers, and volumes to free up space
Adjust Resource
Specify cluster server in kubectl config
Restart Docker Desktop
Remove docker images, containers, and volumes to free up space
Adjust Resource
Specify cluster server in kubectl config
Restart Docker Desktop
I use docker desktop on Windows 10 pro.
The versions are as follows:
Once this problem has been resolved, we are thinking of moving nginx in the manifest file in the next step.
I can't find a solution by myself, so I wrote it here to ask for your advice.
If you have any missing information, please reply.
Thank you for your cooperation.
docker windows-10 kubernetes
Have you solved the name of kubernetes.docker.internal?
I was in the same situation, but I have access to localhost:6443, so
Changed etc/hosts to resolve kubernetes.docker.internal to 127.0.0.1.
In addition, my environment had a proxy, so I would like to make sure that kubernetes.docker.internal does not go through the proxy.
Resolved by adding kubernetes.docker.internal to no_proxy
© 2024 OneMinuteCode. All rights reserved.