abiosoft / abiosoft/colima

Mac M1 Kubernetes - port flapper

Abierto
#1,595 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
30.8k
Forks
613
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Description

When using a profile per the attached details where Kubernetes is provided along as an argument I have some port fluttering making it impossible to use Kubernetes.

This might perhaps be related to: #1339 #1279

It is cyling through the following outputs:
```
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Error from server (ServiceUnavailable): apiserver not ready
```

```
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server 192.168.64.2:58699 was refused - did you specify the right host or port?
```

```
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Error from server (ServiceUnavailable): starting
```

To sometimes giving back a response. When doing an netcat on the host and port:
```
% while true; do nc -z 192.168.64.2 58699 && echo OK || echo FAIL; sleep 1; done
FAIL
Connection to 192.168.64.2 port 58699 [tcp/*] succeeded!
OK
Connection to 192.168.64.2 port 58699 [tcp/*] succeeded!
OK
Connection to 192.168.64.2 port 58699 [tcp/*] succeeded!
OK
FAIL
FAIL
FAIL
Connection to 192.168.64.2 port 58699 [tcp/*] succeeded!
OK
Connection to 192.168.64.2 port 58699 [tcp/*] succeeded!
OK
Connection to 192.168.64.2 port 58699 [tcp/*] succeeded!
OK
```
you can tell it sometimes is fine, but (though not visible from this snippet) more often than not it fails.

I've tried some several suggested solutions:
1. Setting the server to localhost or `127.0.0.1`
2. Adding the `--network-address` argument
3. Using different virtualizations (with and without the `--vz` argument)

However none of it seems to make it stable in such a way that it can be used. Based of earlier issues it also seems as though it's primarily an issue on M1, I would find that strange, but that's coming up from the issues a bit.

### Version

colima version 0.10.3
git commit: 00f6c297e92a82c04a4ab507db0a61435650d7e8

runtime: docker
arch: aarch64
client: v29.5.3
server: v29.5.2
limactl version 2.1.2
qemu-img version 11.0.1
Copyright (c) 2003-2026 Fabrice Bellard and the QEMU Project developers

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [x] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

```
INFO[0000] colima [profile=arm] is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.64.2
INFO[0000] docker socket: unix:///Users/REDACTED/.colima/arm/docker.sock
INFO[0000] containerd socket: unix:///Users/REDACTED/.colima/arm/containerd.sock
INFO[0000] kubernetes: enabled
```

### Reproduction Steps

1. This is where it's tricky, because a colleague with similar setup has no issues, only difference is the chip (M2)
2.
3.

### Expected behaviour

The k8s setup is available stable and each command (`kubectl cluster-info`) and netcat returns the same response.

### Additional context

_No response_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

The issue describes intermittent Kubernetes API server connectivity on Apple Silicon. Start by examining the colima code that manages the Kubernetes cluster lifecycle and port forwarding, particularly for macOS Virtualization.Framework. Look at the logs and network configuration when the port flapping occurs. The goal is to reproduce the instability and identify whether it's related to network address assignment, port allocation, or the apiserver health checks.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, go, kubernetes, macos
Área
cloud, devops
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.