'Kubernetes fail: Unable to connect to the server: dial tcp 127.0.0.1:1423
I create a K8s cluster on Win10 with kind, when I run kubectl get nodes, the following error is showing up.
Unable to connect to the server: dial tcp 127.0.0.1:1423: connectex: No connection could be made because the target machine actively refused it.
In the Docker desktop, it is showing that the nodes are running enter image description here
Here is the cluster config file
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
evictionHard:
nodefs.available: "0%"
# patch it further using a JSON 6902 patch
kubeadmConfigPatchesJSON6902:
- group: kubeadm.k8s.io
version: v1beta2
kind: ClusterConfiguration
patch: |
- op: add
path: /apiServer/certSANs/-
value: my-hostname
# 1 control plane node and 3 workers
nodes:
# the control plane node config
- role: control-plane
# the three workers
- role: worker
- role: worker
- role: worker
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
