Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual Kubelet keeps connections established to remote kubernetes api #2612

Open
serhii-kolomiiets opened this issue Jul 9, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@serhii-kolomiiets
Copy link

serhii-kolomiiets commented Jul 9, 2024

What happened:

There is an issue with established connections to the remote Kubernetes API on Virtual Kubelet. After stopping port-forwarding to a pod running on the virtual node, the connection to the remote Kubernetes API remains active.

What you expected to happen:

The connection to the remote Kubernetes API should be terminated after port-forwarding is completed.

How to reproduce it (as minimally and precisely as possible):

  1. This pod is deployed on virtual node:
    apiVersion: v1
    kind: Pod
    metadata:
    name: vk-pf-test
    namespace: default
    spec:
    containers:
  • name: main
    image: nginx:1.14.2
    ports:
    • containerPort: 80
  1. port-forward execution:
    kubectl port-forward vk-pf-test 8080:80 -n default

3.1. Inside virtual kubelet pod:
watch "netstat -an |grep 'remote_kube_api_ip' |grep ESTABLISHED |wc -l"

3.2. Execute several times from local shell:
curl http://127.0.0.1:8080/

After that we can see that amount of connections from 3.1 command grows, and, even when port-forwarding is dropped, amount of connections is still the same.
This behaviour overloads NAT which is in the middle of virtual-kubelet and remote Kubernetes api server and, also, with lots of ESTABLISHED connections to remote Kubernetes api virtual-kubelet pod memory consumption also grows, and causes OOM issues.

Environment:

  • Liqo version: v0.10.3
  • Liqoctl version: Client version: c707856
  • Kubernetes version (use kubectl version): v1.29.5-gke.1060000
  • Cloud provider or hardware configuration: GCP
@serhii-kolomiiets serhii-kolomiiets added the kind/bug Something isn't working label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant