Skip to content

Instantly share code, notes, and snippets.

@geek182
Last active February 22, 2018 19:46
Show Gist options
  • Select an option

  • Save geek182/08142d29837c1dcc1add701ea827d437 to your computer and use it in GitHub Desktop.

Select an option

Save geek182/08142d29837c1dcc1add701ea827d437 to your computer and use it in GitHub Desktop.
kubernetes-survival-kit
#get logs from a spefic pod and keep reading with -f flag
kubectl logs -f pod/ghost-1-wjf6m
#execute a command in container, if have more than one inside pod first will be select.
kubectl exec 123456-7890 date
#Get output from running 'date' in ruby-container from pod 123456-7890
kubectl exec 123456-7890 -c ruby-container date
#get pod details
kubectl get pod -o wide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment