title: KIND and kubectl: The connection to the server localhost:8080 was refused - did you specify the right host or port?
body: <p>I'm trying to use <a href="https://kind.sigs.k8s.io/" rel="nofollow noreferrer">KIND</a> to spin up my Kubernetes cluster and trying to use it with Kubectl but I'm stymied at the first hurdle</p>
  <p>I set up a cluster using the following kind config</p>
  <pre><code>kind: Cluster
  apiVersion: kind.x-k8s.io/v1alpha4
  nodes:
  - role: control-plane
    extraPortMappings:
      - hostPort: 80
        containerPort: 80
  
  </code></pre>
  <p>Then I use kubectl</p>
  <pre><code>kubectl get nodes
  The connection to the server localhost:8080 was refused - did you specify the right host or port?
  </code></pre>
  <p>This makes sense because if I do <code>docker ps</code></p>
  <pre><code>CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                       NAMES
  9dcd3b6fd19d        kindest/node:v1.17.11   &quot;/usr/local/bin/entr…&quot;   14 minutes ago      Up 14 minutes       127.0.0.1:44609-&gt;6443/tcp   kind-control-plane
  </code></pre>
  <p>What do I have to do to start the kubernetes API server and get the nodes on it?</p>