Class: KBE::CLI::AttachCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/kbe/cli/attach_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/kbe/cli/attach_command.rb', line 15

def execute
  pod = KBE.pod_by selector_or_pod

  args = []
  args << "attach -it #{pod}"
  unless container == :first
    args << "-c #{container}"
  end

  KBE.kubectl args
end