Is there way to "re-use" the current services in the next session of the app? (TUI) #361
-
|
I just started using the tool and am curious whether I can use it in a way that it always restores my currently opened connections in the next start of the app. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @BroderPeters, welcome to kubefwd! There's no session persistence feature, but that's actually by design. kubefwd uses a declarative approach, you tell it what to forward using selectors, rather than listing specific services. This is more powerful because:
Save your command as an alias: # Simple - forward all services in a namespace
alias kfwd='sudo -E kubefwd svc -n my-namespace --tui'
# Label selector - forward only database services
alias kfwd-db='sudo -E kubefwd svc -n dev -l app=database --tui'
# Multiple labels (AND)
alias kfwd-api='sudo -E kubefwd svc -n prod -l app=api,tier=backend --tui'
# Multiple namespaces
alias kfwd-all='sudo -E kubefwd svc -n dev,staging,prod --tui'Advanced selectors: # Field selector - specific service by name
sudo -E kubefwd svc -n dev -f metadata.name=user-service --tui
# Combine label + field selectors
sudo -E kubefwd svc -n dev -l team=platform -f metadata.name!=legacy-svc --tui
# Set-based label selectors
sudo -E kubefwd svc -n dev -l 'environment in (dev, staging)' --tuiThe idea is to craft a selector that captures your working set, save it as an alias, and you're good to go. If you're running |
Beta Was this translation helpful? Give feedback.
Hi @BroderPeters, welcome to kubefwd!
There's no session persistence feature, but that's actually by design. kubefwd uses a declarative approach, you tell it what to forward using selectors, rather than listing specific services. This is more powerful because:
Save your command as an alias: