Class: KBE::CLI::EnterCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- KBE::CLI::EnterCommand
- Defined in:
- lib/kbe/cli/enter_command.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/kbe/cli/enter_command.rb', line 19 def execute cmd_list = ["sh"] unless cmd_list pod = KBE.pod_by selector_or_pod args = [] args << "exec -it #{pod}" unless container == :first args << "-c #{container}" end args << cmd_list.join(" ") KBE.kubectl args end |