abiosoft / colima

Container runtimes on macOS (and Linux) with minimal setup
MIT License
17.75k stars 365 forks source link

colima start --kubernetes: kubernetes cluster unreachable #964

Open dsp opened 5 months ago

dsp commented 5 months ago

Description

colima start --kubernetes

Results in a running kubernetes cluster that is unreachable from the host:

$ kubectl get pods -A
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?

Kubernetes is running within the vm, as can be verified by colima ssh -- kubectl get nodes. Manually starting an ssh tunnel ssh -L6443:127.0.0.1:6443 colima with the generated ssh config from colima, also works.

Version

$ colima version && limactl --version && qemu-img --version
colima version HEAD-4e52450
git commit: 4e52450080340a2861edf647f460563a21e011d4

runtime: docker
arch: x86_64
client: v24.0.7
server: v24.0.7
limactl version 0.19.1
qemu-img version 8.2.0
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

Operating System

Output of colima status

INFO[0005] colima is running using macOS Virtualization.Framework
INFO[0005] arch: x86_64
INFO[0005] runtime: docker
INFO[0005] mountType: virtiofs
INFO[0005] socket: unix:///Users/dsp/.colima/default/docker.sock
INFO[0010] kubernetes: enabled

Reproduction Steps

  1. colima start --kubernetes
  2. kubectl get pods -A

Expected behaviour

kubectl returning the running pods

Additional context

No response