diff --git a/internal/client/config.go b/internal/client/config.go index e14a6b7e19..7fa4321869 100644 --- a/internal/client/config.go +++ b/internal/client/config.go @@ -75,6 +75,7 @@ func (c *Config) SwitchContext(name string) error { flags := genericclioptions.NewConfigFlags(UsePersistentConfig) flags.Context = &name flags.Timeout = c.flags.Timeout + flags.KubeConfig = c.flags.KubeConfig c.flags = flags return nil