siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.9k stars 555 forks source link

Port forward not working on fresh install of Talos 1.8.2 #9703

Closed zarko-a closed 1 week ago

zarko-a commented 1 week ago

Bug Report

Trying to connect through an established port forward on a freshly installed Talos 1.8.2 fails and stops the port forwarding.

Description

During the initial cluster setup I needed to connect to argocd-server pod with argocd client app (which just needs to establish a TCP connection to the pod), unfortunately, as soon as the connection is attempted the port forwarding errors out and stops.

Freshly created [single node] cluster with talosctl gen config talos-proxmox-cluster https://$CONTROL_PLANE_IP:6443 --output-dir _out --install-image factory.talos.dev/installer/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba:v1.8.2

The only additional options configured allowSchedulingOnControlPlanes: true and custom time servers.

Logs

kubectl port-forward svc/argocd-server -n argocd 8080:443
Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080
Handling connection for 8080
E1111 22:12:47.341568   78740 portforward.go:413] "Unhandled Error" err="an error occurred forwarding 8080 -> 8080: error forwarding port 8080 to pod 2c778972daa5bd15cd674f402b93247981063bd5252e7e362d7102280d106c05, uid : failed to execute portforward in network namespace \"/var/run/netns/cni-f5f845ba-31d1-21b6-9ee3-a363a8acaffc\": writeto tcp4 127.0.0.1:55744->127.0.0.1:8080: read tcp4 127.0.0.1:55744->127.0.0.1:8080: read: connection reset by peer"
error: lost connection to pod

in another terminal

argocd login localhost:8080
FATA[0001] dial tcp [::1]:8080: connect: connection refused

Environment

- Kubernetes version: [`kubectl version --short`]

kubectl version
Client Version: v1.31.2 Kustomize Version: v5.4.2 Server Version: v1.31.1


- Platform:
Proxmox 7.4
zarko-a commented 1 week ago

Sorry, I opened this issue too quickly. It seems to be a problem on argocd client side when server is set to insecure mode which it was in my case.

More info for anyone that might encounter the same problem https://github.com/argoproj/argo-cd/issues/8613