CmdID / kubectl / kubectl create / kubectl create secret
kubectl create secret generic
Create a secret from a local file, directory, or literal value kubectl reference
14 options Its page in the kubectl reference
Options
--allow-missing-template-keysIf true, ignore any errors in templates when a field or map key is missing in the template.--append-hashAppend a hash of the secret to its name.--dry-runMust be "none", "server", or "client".--field-managerName of the manager used to track field ownership.--from-env-fileSpecify the path to a file to read lines of key=val pairs to create a secret.--from-fileKey files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used.--from-literalSpecify a key and literal value to insert in secret (i.e. mykey=somevalue)--help, -hhelp for generic--output, -oOutput format.--save-configIf true, the configuration of current object will be saved in its annotation.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--templateTemplate string or path to template file to use when -o=go-template, -o=go-template-file.--typeThe type of secret to create--validateMust be one of: strict (or true), warn, ignore (or false).