mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Allow setting service account with kubectl run
This commit is contained in:
@@ -117,6 +117,7 @@ func addRunFlags(cmd *cobra.Command) {
|
||||
cmd.Flags().Bool("rm", false, "If true, delete resources created in this command for attached containers.")
|
||||
cmd.Flags().String("overrides", "", i18n.T("An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field."))
|
||||
cmd.Flags().StringArray("env", []string{}, "Environment variables to set in the container")
|
||||
cmd.Flags().String("serviceaccount", "", "Service account to set in the pod spec")
|
||||
cmd.Flags().String("port", "", i18n.T("The port that this container exposes. If --expose is true, this is also the port used by the service that is created."))
|
||||
cmd.Flags().Int("hostport", -1, "The host port mapping for the container port. To demonstrate a single-machine container.")
|
||||
cmd.Flags().StringP("labels", "l", "", "Labels to apply to the pod(s).")
|
||||
|
||||
Reference in New Issue
Block a user