Comments (5)
Btw, I'm experiencing very similar problem. The moment pod gets reshuffled or new deployment happens, the port forwarding dies and does not recover (even after 5 minutes), see below:
❯ sudo kubefwd svc -v --namespace postgresql -f metadata.name=postgresql
Password:
INFO[15:32:08] _ _ __ _
INFO[15:32:08] | | ___ _| |__ ___ / _|_ ____| |
INFO[15:32:08] | |/ / | | | '_ \ / _ \ |_\ \ /\ / / _ |
INFO[15:32:08] | <| |_| | |_) | __/ _|\ V V / (_| |
INFO[15:32:08] |_|\_\\__,_|_.__/ \___|_| \_/\_/ \__,_|
INFO[15:32:08]
INFO[15:32:08] Version 1.22.4
INFO[15:32:08] https://github.com/txn2/kubefwd
INFO[15:32:08]
INFO[15:32:08] Press [Ctrl-C] to stop forwarding.
INFO[15:32:08] 'cat /etc/hosts' to see all host entries.
INFO[15:32:08] Loaded hosts file /etc/hosts
INFO[15:32:08] HostFile management: Original hosts backup already exists at /Users/kolo/hosts.original
INFO[15:32:08] Successfully connected context: docker-desktop
DEBU[15:32:08] Registry: Start forwarding service postgresql.postgresql.docker-desktop
DEBU[15:32:08] Resolving: postgresql to 127.1.27.1 (postgresql)
INFO[15:32:08] Port-Forward: 127.1.27.1 postgresql:5432 to pod postgresql-0:5432
ERRO[15:34:39] Runtime: an error occurred forwarding 5432 -> 5432: error forwarding port 5432 to pod c9a9c7e84ba15c880fd6ce333089cf1022519ba2ca890a44e7afd9172f1195da, uid : container not running (c9a9c7e84ba15c880fd6ce333089cf1022519ba2ca890a44e7afd9172f1195da)
ERRO[15:34:39] Runtime: lost connection to pod
WARN[15:34:39] Stopped forwarding pod postgresql-0 for postgresql.postgresql.docker-desktop
INFO[15:40:10] update service postgresql/postgresql.
from kubefwd.
@ndj888 this is a tool for local development isn't it?
When service gets redeployed in the cluster you're connected to, you want your local app to pick this up. 5 min delay makes reconnect virtually non-functional. For me, 5 seconds would be more appropriate as I want to focus on app I work on, and let kubefwd
do its job :)
Idea: why not just make timeout a CLI option and let users decide what is best resource/delay combo?
from kubefwd.
@imdbere kubefwd checks the pod list every 5 minutes and will fix this automatically. I don't think it's necessary for kubefwd to monitor pod changes and react in real time, it will consume more resources. It is recommended to use kubefwd for local development environment. If stable access to pods inside the cluster is required, I recommend using a private load balancer for service exposure.
from kubefwd.
5 min delay in reconnecting effectively means that user must stop kubefwd and restart it, i.e. waiting 5 mins is long time to wait when trying to do some development work locally.
from kubefwd.
I've been having the same problem since I first started using kubefwd years ago, I have to restart it a lot. I even tried putting in a fix that was merged, but the issue resurfaced again later.
e.g. #153
from kubefwd.
Related Issues (20)
- sudo-less option HOT 4
- [Discussion] Exposing the forwarded ports to a different pod in K8s
- unknown command "oidc-login" for "kubectl" HOT 2
- add insecure connect support HOT 1
- running kubefwd multiple times in parallel HOT 2
- Kubefwd not passing along app requests
- Option to display created Local Domains HOT 1
- windows host file didnot work HOT 1
- Forwarding of headless service is not showing up HOT 1
- No pods running error
- There are too many hostname aliases per line in a Windows hosts file
- Fish completions aren't working properly HOT 1
- WARN[18:55:59] WARNING: No Pod selector for service xxx.yyy, skipping HOT 1
- Option to restart forwarding on TLS connection reset. HOT 1
- aws eks: The config profile (prod/administrators) could not be found
- Unable to forward to gke cluster. HOT 2
- kubefwd cant save changings in hosts file HOT 4
- oidc-login not found on Linux HOT 1
- kubelogin can't use auth token after it gets refreshed by kubefwd HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubefwd.