Run an Ubuntu pod, overriding the default command with echo, and specifying custom arguments

kubectl run

  • Run pods in Kubernetes. Specifies pod generator to avoid deprecation error in some K8S versions.
    More information: <https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

kubectl run --generator=run-pod/v1 temp-ubuntu --image=ubuntu:20.04 --command -- echo arg1 arg2 arg3

click the source code to copy install kubectl run on any operating system with command-not-found.com