15 16 17 18 19 20 21 22 23 24
# File 'lib/kbe/cli/list_command.rb', line 15 def execute if pod json = JSON.parse(`kubectl get pod #{pod} -o json`) for container in json["spec"]["containers"] puts container["name"] end else KBE.kubectl ["get pod"] end end