update docs

mine
derailed 2020-04-06 07:47:05 -06:00
parent 4c6e545885
commit bf427dda78
2 changed files with 26 additions and 2 deletions

View File

@ -113,6 +113,31 @@ k9s --context coolCtx
k9s --readonly
```
## Logs
Given the nature of the ui k9s does produce logs to a specific location. To view the logs or turn on debug mode, use the following commands:
```shell
k9s info
# Will produces something like this
# ____ __.________
# | |/ _/ __ \______
# | < \____ / ___/
# | | \ / /\___ \
# |____|__ \ /____//____ >
# \/ \/
#
# Configuration: /Users/fernand/.k9s/config.yml
# Logs: /var/folders/8c/hh6rqbgs5nx_c_8k9_17ghfh0000gn/T/k9s-fernand.log
# Screen Dumps: /var/folders/8c/hh6rqbgs5nx_c_8k9_17ghfh0000gn/T/k9s-screens-fernand
# To view k9s logs
tail -f /var/folders/8c/hh6rqbgs5nx_c_8k9_17ghfh0000gn/T/k9s-fernand.log
# Start K9s in debug mode
k9s -l debug
```
## Key Bindings
K9s uses aliases to navigate most K8s resources.

View File

@ -158,8 +158,7 @@ func (c *Command) run(cmd, path string, clearStack bool) error {
}
func (c *Command) defaultCmd() error {
err := c.run(c.app.Config.ActiveView(), "", true)
if err != nil {
if err := c.run(c.app.Config.ActiveView(), "", true); err != nil {
log.Error().Err(err).Msgf("Saved command failed. Loading default view")
return c.run("pod", "", true)
}