Added kubeconfig option to Pod and Container shell commands

mine
Sebastiaan Tammer 2019-05-27 00:22:35 +02:00
parent 247cc634be
commit eb8ac7d3df
2 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,7 @@ func (v *containerView) shellIn(path, co string) {
args = append(args, "exec", "-it")
args = append(args, "--context", v.app.config.K9s.CurrentContext)
args = append(args, "-n", ns)
args = append(args, "--kubeconfig", *v.app.config.GetConnection().Config().Flags().KubeConfig)
args = append(args, po)
if len(co) != 0 {
args = append(args, "-c", co)

View File

@ -181,6 +181,7 @@ func (v *podView) shellIn(path, co string) {
args = append(args, "exec", "-it")
args = append(args, "--context", v.app.config.K9s.CurrentContext)
args = append(args, "-n", ns)
args = append(args, "--kubeconfig", *v.app.config.GetConnection().Config().Flags().KubeConfig)
args = append(args, po)
if len(co) != 0 {
args = append(args, "-c", co)