-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Port Forward deleted without UI notification when forwarding to wrong port #3301
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
Comments
@igorakkerman , I tried to replicate your issue manually and got the below response in my cluster.
Only the error statement is printed to k9s.log. Do you want the log file to have the below message as well?
|
Hi @R-Abinesh, thanks for looking into this. Yes, IMO the logs should show a more expressive message, similar to what kubectl shows. That adds to what I was actually referring to: I would hope not to even need to go to the logs but see an expressive output straight in the k9s UI. |
An additional note/request: |
@igorakkerman Actually this what we use to do in early k9s versions... I agree the message should bubble up to the ui in case of failures causing deletions and will update in the next drop. |
Thanks @derailed , I agree that the user should have the final say and be free to enter whatever they want. However, a simple warning to them might be a compromise. Showing a warning could be opted in or out in the settings, depending on what you would choose as the default. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [derailed/k9s](https://github.com/derailed/k9s) | minor | `v0.40.10` -> `v0.50.5` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>derailed/k9s (derailed/k9s)</summary> ### [`v0.50.5`](https://github.com/derailed/k9s/releases/tag/v0.50.5) [Compare Source](derailed/k9s@v0.50.4...v0.50.5) <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/> ### Release v0.50.5 #### Notes Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated! Also big thanks to all that have allocated their own time to help others on both slack and on this repo!! As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@​kitesurfer](https://twitter.com/kitesurfer) On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/zt-3360a389v-ElLHrb0Dp1kAXqYUItSAFA) #### Maintenance Release! *** #### Resolved Issues - [#​3328](derailed/k9s#3328) Pod overview shows wrong number of running containers with sidecar init-container - [#​3309](derailed/k9s#3309) \[0.50.4] k9s crashes when attempting to load logs - [#​3301](derailed/k9s#3301) Port Forward deleted without UI notification when forwarding to wrong port - [#​3294](derailed/k9s#3294) \[0.50.4] k9s crashes when filtering based on labels - [#​3278](derailed/k9s#3278) k9s doesn't honor the --namespace parameter *** #### Contributed MRs Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!! - [#​3311](derailed/k9s#3311) Fix concurrent read writes - [#​3310](derailed/k9s#3310) fix: use full path of date to avoid conflict - [#​3308](derailed/k9s#3308) Show replicasets from deployment view - [#​3300](derailed/k9s#3300) fix: truncate label selector input to max length - [#​3296](derailed/k9s#3296) fix: update time format in logging to 24-hour format *** <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2025 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) ### [`v0.50.4`](https://github.com/derailed/k9s/releases/tag/v0.50.4) [Compare Source](derailed/k9s@v0.50.3...v0.50.4) <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/> ### Release v0.50.4 #### Notes Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated! Also big thanks to all that have allocated their own time to help others on both slack and on this repo!! As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@​kitesurfer](https://twitter.com/kitesurfer) On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/zt-3360a389v-ElLHrb0Dp1kAXqYUItSAFA) #### Maintenance Release! *** #### Resolved Issues - [#​3288](derailed/k9s#3288) Resource search doesn't filter by name in custom view - [#​3286](derailed/k9s#3286) K9S doesn't understand matchExpressions selector in Deployment to Pod navigation - [#​3285](derailed/k9s#3285) Rollout Restart method conflicts with GitOps (Flux, ArgoCD) - [#​3283](derailed/k9s#3283) Deployment status showing wrong ready state - [#​3278](derailed/k9s#3278) k9s doesn't honor the --namespace parameter *** #### Contributed MRs Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!! - [#​3292](derailed/k9s#3292) fix: respect insecure flag when switch context - [#​3277](derailed/k9s#3277) feat: add hostPathVolume (docker) - [#​3253](derailed/k9s#3253) fix: set default request timeout to 120 seconds - [#​2866](derailed/k9s#2866) Feature/default_view *** <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2025 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) ### [`v0.50.3`](https://github.com/derailed/k9s/releases/tag/v0.50.3) [Compare Source](derailed/k9s@v0.50.2...v0.50.3) <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/> ### Release v0.50.3 #### Notes Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated! Also big thanks to all that have allocated their own time to help others on both slack and on this repo!! As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@​kitesurfer](https://twitter.com/kitesurfer) On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/zt-3360a389v-ElLHrb0Dp1kAXqYUItSAFA) #### Maintenance Release! A bit more code spring cleaning/TLC and address a few bugs: 1. \[RBAC View] Fix issue bombing out on RBAC cluster roles 2. \[Custom Views] Fix issue with parsing `jq` filters and bombing out (Big Thanks to Pierre for flagging it!) *** #### Contributed MRs Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!! - [#​3273](derailed/k9s#3273) k9s plugin scopes containers issue - [#​3169](derailed/k9s#3169) feat: pass context and token flags to kubectl exec commands *** <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2025 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) ### [`v0.50.2`](https://github.com/derailed/k9s/releases/tag/v0.50.2) [Compare Source](derailed/k9s@v0.50.1...v0.50.2) <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/> ### Release v0.50.2 #### Notes Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated! Also big thanks to all that have allocated their own time to help others on both slack and on this repo!! As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@​kitesurfer](https://twitter.com/kitesurfer) On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM) #### 5-0, 5-0 HotFix! It looks like we've broken a few (more) things in the clean up process 😳 This is what you get for trying to refresh a ~10 year old code base 🙀 Apologizes for the `disruption in the farce`. Hopefully much happier on v0.50.2... Are we there yet? Crossing fingers AND toes... ☠️ Careful on this upgrade! 🏴☠️ We've gone thru lots of code revamp/refactor in the v0.50.0, so mileage may vary... *** #### Resolved Issues - [#​3267](derailed/k9s#3267) Show some output or message when no resources are found - [#​3266](derailed/k9s#3266) Command alias :dp fails with "no resource meta defined for deployments" error - [#​3264](derailed/k9s#3264) can't execute get(y) or describe(d) in StorageClass view - [#​3260](derailed/k9s#3260) yaml view of pod will crash the app (Boom!! cannot deep copy int. (Maybe??) *** <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2025 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) ### [`v0.50.1`](https://github.com/derailed/k9s/releases/tag/v0.50.1) [Compare Source](derailed/k9s@v0.50.0...v0.50.1) <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/> ### Release v0.51 #### Notes Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated! Also big thanks to all that have allocated their own time to help others on both slack and on this repo!! As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@​kitesurfer](https://twitter.com/kitesurfer) On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM) #### 5-0, 5-0 HotFix! It looks like we've broken a few things in the clean up process 😳 Apologizes for the `disruption in the farce`. Hopefully happier on v0.50.1... Crossing fingers and toes! ☠️ Careful on this upgrade! 🏴☠️ We've gone thru lots of code revamp/refactor in the v0.50.0, so mileage may vary... *** #### Resolved Issues - [#​3262](derailed/k9s#3262) Crash when no shellPod is defined in config file - [#​3261](derailed/k9s#3261) aliases with namespace and/or labels produce an error - [#​3258](derailed/k9s#3258) mac silicon 0.50.0 runtime error - [#​3257](derailed/k9s#3257) pods are reported to run on nodes they are not running on - [#​3256](derailed/k9s#3256) Pods view seems broken in 0.50.0 - [#​3255](derailed/k9s#3255) Custom view does not work randomly *** <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2025 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) ### [`v0.50.0`](https://github.com/derailed/k9s/releases/tag/v0.50.0) [Compare Source](derailed/k9s@v0.40.10...v0.50.0) <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/> ### Release v0.50 #### Notes Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated! Also big thanks to all that have allocated their own time to help others on both slack and on this repo!! As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@​kitesurfer](https://twitter.com/kitesurfer) On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM) *** #### ♫ Sounds Behind The Release ♭ - [Afterimage - Justice](https://www.youtube.com/watch?v=9zBJlLbkfzA) - [This Is The Day - The The](https://www.youtube.com/watch?v=qBF3YqUzYRc) #### 5-O, 5-0... Spring Cleaning In Effect! ☠️ Careful on this upgrade! 🏴☠️ We've gone thru lots of code revamp/refactor on this drop, so mileage may vary!! ##### K9s Slow? It looks like K9s performance took a dive in the wrong direction circa v0.40.x releases. Took a big perf/cleanup pass to improve perf and think this release should help a lot (famous last words...) > NOTE! As my dear granny use to say: `You can't cook a great meal without trashing the kitchen`, > So likely I have broken a few things in the process. So thread carefully and report back! ##### Now with Super Column Blow! By general demand, juice up custom views! In a feature we like to refer to as `Super Column Blow...` As of this drop, you can go full `Chuck Norris` and sprinkle some of your JQ_FU with you custom views. For example... ```yaml ### views.yaml views: v1/pods: sortColumn: NAME:asc columns: - AGE - NAMESPACE - NAME - IMG-VERSION:.spec.containers[0].image|split(":")|.[-1]|R # => Grab the main container image name and pull the image version ### => out into the `IMG-VERSION` right aligned column ``` > NOTE: ☢️ This is very much experimental! Not all JQ queries features are supported! > (See https://github.com/itchyny/gojq for the details!) #### Videos Are In The Can! Please dial [K9s Channel](https://www.youtube.com/channel/UC897uwPygni4QIjkPCpgjmw) for up coming content... - [K9s v0.40.0 -Column Blow- Sneak peek](https://youtu.be/iy6RDozAM4A) - [K9s v0.31.0 Configs+Sneak peek](https://youtu.be/X3444KfjguE) - [K9s v0.30.0 Sneak peek](https://youtu.be/mVBc1XneRJ4) - [Vulnerability Scans](https://youtu.be/ULkl0MsaidU) *** #### Resolved Issues - [#​3226](derailed/k9s#3226) Filter view will show mess when filtering some string - [#​3224](derailed/k9s#3224) Respect kubectl.kubernetes.io/default-container annotation - [#​3222](derailed/k9s#3222) Option to Display Resource Names Without API Version Prefix - [#​3210](derailed/k9s#3210) Description line is buggy *** #### Contributed MRs Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!! - [#​3237](derailed/k9s#3237) fix: List CRDs which has k8s.io in their names - [#​3223](derailed/k9s#3223) Fixed skin config ref of in_the_navy to in-the-navy - [#​3110](derailed/k9s#3110) feat: add splashless option to suppress splash screen on start *** <img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2025 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTkuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When I create a port forward to the wrong port, the port forward gets deleted without a UI notification. The error message in the log is not expressive.
When creating the port forward on a service, rather than on a pod, and the service exposes a different port than the pod does, it's easy to run into that issue, see below.
To Reproduce
kubectl run nginx --image nginx
81
as container and local portscurl --verbose 'http://127.0.0.1:81/'
Expected behavior
Versions:
Additional context
I ran into this issue trying to connect to a service, which exposes port 80 and has
targetPort
8080. I used port 80 in k9s as I did with kubectl:While kubectl forwards to 8080, k9s suggests 8080 but lets you enter any port,
80
in my case.I didn't notice the pod's port in the kubectl output:
That's how I got stuck with the connection failing with k9s.
The text was updated successfully, but these errors were encountered: