8000 fix: set default request timeout to 120 seconds by maxsxu · Pull Request #3253 · derailed/k9s · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: set default request timeout to 120 seconds #3253

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

Merged
merged 2 commits into from
Apr 19, 2025

Conversation

maxsxu
Copy link
Contributor
@maxsxu maxsxu commented Apr 8, 2025

Motivation

Fixes #3207

Modifications

  • Change default request timeout to 120s from 5s. Since 5s is too short for most of requests, especially for large clusters in production environment.

And according to kubectl docs, the default kubectl request timeout is 0 which means don't timeout requests. Maybe we should do so too for k9s, but let's see.

Signed-off-by: Max Xu <xuhuan@live.cn>
@derailed
Copy link
Owner

@maxsxu Thank you for this update! The current default timeout is 10s.
I am hesitating making it any bigger, since you can easily override it with a cli arg.
What do you think?

@derailed derailed added the question Further information is requested label Apr 13, 2025
@maxsxu
Copy link
Contributor Author
maxsxu commented Apr 14, 2025

@maxsxu Thank you for this update! The current default timeout is 10s. I am hesitating making it any bigger, since you can easily override it with a cli arg. What do you think?

@derailed Thanks for reply!

And yes we can override via cli arg, but if this is something users' frequent use case, then we can make it a common option.

So wondering what's the backwards if making the default timeout bigger? If that won't break us, then I suggest making it bigger.

@robert-openai
Copy link
robert-openai commented Apr 14, 2025

@derailed Could you at least make it something you can set in config.yaml? I didn't see anything mentioned in the documentation about it. The K8s clusters I deal with regularly are far too big to reliably reply within the default request timeout.

@vitali-raikov
Copy link
vitali-raikov commented Apr 15, 2025

We are in the same boat, we are dealing with a pretty big clusters (~20K pods) so a lot of k9s functionality is just not working unless we set timeout to something like 20-30 seconds.

Setting CLI arg is a workaround and I could probably alias my k9s command to be something like k9s --request-timeout=30s to k9s but it would be nice to be able to override it via config.yaml as @robert-openai proposed.

@MrVinkel
Copy link

I work with crossplane clusters which has 100k+ resources and I have to specify the --request-timeout for doing anything in those. Working with any bigish cluster a timeout of 10s is just too small.

I agree with @vitali-raikov that it would be nice if it could be configured in the config.yaml

@gottschd
Copy link

Please allow me to share my user experience with K9s, in the spirit of honest feedback.

As a casual, non-professional user, I've found K9s incredibly user-friendly, particularly when installed and updated via Chocolatey on Windows. It has consistently worked seamlessly for me with the default settings, requiring no additional configuration, which has been greatly appreciated.

However, with the recent change in the default request time, I encountered some unexpected challenges. This led to a bit of a troubleshooting journey to identify the source of the issue. My DevOps colleagues (who were using an much much older version of K9s 😄 ) , initially speculated about network infrastructure and "TCP keep-alive" settings, topics that are quite complex for me to grasp.

I am grateful for the timeout fix that has been proposed, as it allows me to return to the straightforward experience of having K9s work effortlessly out of the box for my needs.

Thank you for your effort and continued dedication to improving the software.

@derailed
Copy link
Owner

@maxsxu Thank you for this PR!
@robert-openai @vitali-raikov @MrVinkel Thank you all for pipping in and for your feedback!

Good points! I think the solution lies in the middle as @robert-openai correctly points out.

So I think we should do the following:

  1. Augment the default timeout as per Max's excellent pr.
  2. Add a new K9s configuration option to allow users to override this setting in their k9s config.

I think that should hit all the concerns raised here.
How does this sound?

Copy link
Owner
@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxsxu Thank you for this update Max!

@derailed derailed merged commit fbd2a02 into derailed:master Apr 19, 2025
@derailed derailed mentioned this pull request Apr 19, 2025
@maxsxu maxsxu deleted the max/fix branch April 28, 2025 03:37
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 10, 2025
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! [@&#8203;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

-   [#&#8203;3328](derailed/k9s#3328) Pod overview shows wrong number of running containers with sidecar init-container
-   [#&#8203;3309](derailed/k9s#3309) \[0.50.4] k9s crashes when attempting to load logs
-   [#&#8203;3301](derailed/k9s#3301) Port Forward deleted without UI notification when forwarding to wrong port
-   [#&#8203;3294](derailed/k9s#3294) \[0.50.4] k9s crashes when filtering based on labels
-   [#&#8203;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!!

-   [#&#8203;3311](derailed/k9s#3311) Fix concurrent read writes
-   [#&#8203;3310](derailed/k9s#3310) fix: use full path of date to avoid conflict
-   [#&#8203;3308](derailed/k9s#3308) Show replicasets from deployment view
-   [#&#8203;3300](derailed/k9s#3300) fix: truncate label selector input to max length
-   [#&#8203;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! [@&#8203;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

-   [#&#8203;3288](derailed/k9s#3288) Resource search doesn't filter by name in custom view
-   [#&#8203;3286](derailed/k9s#3286) K9S doesn't understand matchExpressions selector in Deployment to Pod navigation
-   [#&#8203;3285](derailed/k9s#3285) Rollout Restart method conflicts with GitOps (Flux, ArgoCD)
-   [#&#8203;3283](derailed/k9s#3283) Deployment status showing wrong ready state
-   [#&#8203;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!!

-   [#&#8203;3292](derailed/k9s#3292) fix: respect insecure flag when switch context
-   [#&#8203;3277](derailed/k9s#3277) feat: add hostPathVolume (docker)
-   [#&#8203;3253](derailed/k9s#3253) fix: set default request timeout to 120 seconds
-   [#&#8203;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! [@&#8203;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!!

-   [#&#8203;3273](derailed/k9s#3273) k9s plugin scopes containers issue
-   [#&#8203;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! [@&#8203;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

-   [#&#8203;3267](derailed/k9s#3267) Show some output or message when no resources are found
-   [#&#8203;3266](derailed/k9s#3266) Command alias :dp fails with "no resource meta defined for deployments" error
-   [#&#8203;3264](derailed/k9s#3264) can't execute get(y) or describe(d) in StorageClass view
-   [#&#8203;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! [@&#8203;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

-   [#&#8203;3262](derailed/k9s#3262) Crash when no shellPod is defined in config file
-   [#&#8203;3261](derailed/k9s#3261) aliases with namespace and/or labels produce an error
-   [#&#8203;3258](derailed/k9s#3258) mac silicon 0.50.0 runtime error
-   [#&#8203;3257](derailed/k9s#3257) pods are reported to run on nodes they are not running on
-   [#&#8203;3256](derailed/k9s#3256) Pods view seems broken in 0.50.0
-   [#&#8203;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! [@&#8203;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

-   [#&#8203;3226](derailed/k9s#3226) Filter view will show mess when filtering some string
-   [#&#8203;3224](derailed/k9s#3224) Respect kubectl.kubernetes.io/default-container annotation
-   [#&#8203;3222](derailed/k9s#3222) Option to Display Resource Names Without API Version Prefix
-   [#&#8203;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!!

-   [#&#8203;3237](derailed/k9s#3237) fix: List CRDs which has k8s.io in their names
-   [#&#8203;3223](derailed/k9s#3223) Fixed skin config ref of in_the_navy to in-the-navy
-   [#&#8203;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=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frequent timeout when listing some resources but kubectl works
6 participants
0