I am trying to run minikube
on my local machine and get an error from kubectl
.
The error message is: Unable to connect to the server: dial tcp 192.168.2.15:8443: connectex: No connection could be made because the target machine actively refused it.
Please see screenshot below.
I have tried all recommendations in Unable to run Kubernetes (kubectl) and Minikube on windows 10. Unable to connect to the server: dial tcp [::1]:8080: connectex: without any luck.
Any ideas for a fix?
UPDATE:
- Install was done following the instructions on https://kubernetes.io/docs/tasks/tools/install-minikube/
- Hyper-V was installed on my Win 10 machine
- Installed
kubernetes-cli/kubectl
using Chocolatey - Downloaded
minikube-installer.exe
and ran it - Created virtual switch with Hyper-V manager
Started cluster with
minikube start --vm-driver hyperv --hyperv-virtual-switch "myswitch"
After connection issue I tried:
- Disable dynamic memory on minikube VM
- Disable IPv6 protocal
- Set KUBECONFIG env variable
- Restart minikube
Output from minikube status
and minikube ip
:
minikube status
,minikube ip
– Ignacio Millán