<p>I have a simple nginx pod and a k0s cluster setup with the k0s binary. Now i want to connect to that pod, but i get this error:</p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl port-forward frontend-deployment-786ddcb47-p5kkv 7000:80

error: error upgrading connection: error dialing backend: rpc error: code = Unavailable 
desc = connection error: desc = &quot;transport: Error while dialing dial unix /var/lib/k0s/run/konnectivity-server/konnectivity-server.sock: connect: connection refused&quot;
</code></pre>
<p>I dont understand why this happens and why it is tries to access <code>/var/lib/k0s/run/konnectivity-server/konnectivity-server.sock</code> which does not exist on my maschine.</p>
<p>Do I have to add my local dev maschine with k0s to the cluster?</p>
<p>Extract from <code>pod describe</code>:</p>
<pre class="lang-sh prettyprint-override"><code>Containers:
  frontend:
    Container ID:   containerd://897a8911cd31c6d58aef4b22da19dc8166cb7de713a7838bc1e486e497e9f1b2
    Image:          nginx:1.16
    Image ID:       docker.io/library/nginx@sha256:d20aa6d1cae56fd17cd458f4807e0de462caf2336f0b70b5eeb69fcaaf30dd9c
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Thu, 28 Jan 2021 14:20:58 +0100
    Ready:          True
    Restart Count:  0
    Environment:    &lt;none&gt;
Events:
  Type    Reason     Age    From               Message
  ----    ------     ----   ----               -------
  Normal  Scheduled  3m43s  default-scheduler  Successfully assigned remove-me/frontend-deployment-786ddcb47-p5kkv to k0s-worker-2
  Normal  Pulling    3m42s  kubelet            Pulling image &quot;nginx:1.16&quot;
  Normal  Pulled     3m33s  kubelet            Successfully pulled image &quot;nginx:1.16&quot; in 9.702313183s
  Normal  Created    3m32s  kubelet            Created container frontend
  Normal  Started    3m32s  kubelet            Started container frontend
</code></pre>
<p>deployment.yml and service.yml</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend-deployment
  labels:
    app: frontend
spec:
  replicas: 2
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
      - name: frontend
        image: nginx:1.16
        ports:
        - containerPort: 80
----
apiVersion: v1
kind: Service
metadata:
  name: frontend-service
spec:
  selector:
    app: frontend
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
</code></pre>

TecBeast
<p>Workaround is to just remove the file.</p>
<p><code>/var/lib/k0s/run/konnectivity-server/konnectivity-server.sock</code> and restart the server.</p>
<p>Currenlty my github issue is still open.</p>
<p><a href="https://github.com/k0sproject/k0s/issues/665" rel="nofollow noreferrer">https://github.com/k0sproject/k0s/issues/665</a></p>
