Skip to content

Instantly share code, notes, and snippets.

@ecliptik
Last active June 11, 2019 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecliptik/30b8895850042dc5cb22450a5af00a21 to your computer and use it in GitHub Desktop.
Save ecliptik/30b8895850042dc5cb22450a5af00a21 to your computer and use it in GitHub Desktop.
Useful kubectl commands

kubectl tricks

Operations

Run a on-off debian container with interactive shell and remove on exit

kubectl run --generator=run-pod/v1 --image=debian debian --rm -i --tty -- /bin/bash

Forward a service port locally

kubectl port-forward svc/<name> <port>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment