kubernetes-piraeus.window.sh 644 B

1234567891011121314151617181920
  1. # Set window root path. Default is `$session_root`.
  2. # Must be called before `new_window`.
  3. #window_root "~/Projects/kubernetes"
  4. # Create new window. If no argument is given, window name will be based on
  5. # layout file name.
  6. new_window "piraeus"
  7. run_cmd "kubectl watch piraeus"
  8. mapfile -t pod_names < <(kubectl get --no-headers=true -n piraeus -o custom-columns='NAME:metadata.name,NAME:spec.nodeName' pods | awk '/piraeus-op-ns-node/ && (/kube1/ || /kube2/) { print $1 }')
  9. split_v 50
  10. run_cmd "echo kubectl -n piraeus exec -it ${pod_names[0]} -- /bin/bash"
  11. split_h 50
  12. run_cmd "echo kubectl -n piraeus exec -it ${pod_names[1]} -- /bin/bash"