Description:

  • Create and run an image in a pod
  • kubectl run -it pod-name --image=nginx -- /bin/bash

Synopis:

  • kubectl run NAME
    • --image=image
    • [--env="key=value"]
    • [--labels/-l]: comma separated label. ex: -l app=nginx,env:dev
    • [--port=port]
    • [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...]

List of flags:

  • -rm
  • -it/--stdin
  • -tty