1podman-secret-create(1)     General Commands Manual    podman-secret-create(1)
2
3
4

NAME

6       podman-secret-create - Create a new secret
7
8

SYNOPSIS

10       podman secret create [options] name file|-
11
12

DESCRIPTION

14       Creates  a  secret  using  standard input or from a file for the secret
15       content.
16
17
18       Create accepts a path to a file, or -, which tells podman to  read  the
19       secret from stdin
20
21
22       A secret is a blob of sensitive data which a container needs at runtime
23       but is not stored in the image or in source control, such as  usernames
24       and  passwords,  TLS certificates and keys, SSH keys or other important
25       generic strings or binary content (up to 500 kb in size).
26
27
28       Secrets are not committed to an image with podman commit, and does  not
29       get committed in the archive created by a podman export command.
30
31
32       Secrets can also be used to store passwords for podman login to authen‐
33       ticate against container registries.
34
35

OPTIONS

37   --driver, -d=driver
38       Specify the secret driver (default file).
39
40
41   --driver-opts=key1=val1,key2=val2
42       Specify driver specific options.
43
44
45   --env=false
46       Read secret data from environment variable.
47
48
49   --help
50       Print usage statement.
51
52
53   --label, -l=key=val1,key2=val2
54       Add label to secret. These labels can be viewed in podman  secrete  in‐
55       spect or ls.
56
57
58   --replace=false
59       If  existing  secret  with the same name already exists, update the se‐
60       cret.  The --replace option does not  change  secrets  within  existing
61       containers, only newly created containers.
62        The default is false.
63
64

SECRET DRIVERS

66   file
67       Secret resides in a read-protected file.
68
69
70   pass
71       Secret resides in a GPG-encrypted file.
72
73
74   shell
75       Secret  is managed by custom scripts. An environment variable SECRET_ID
76       is passed to the scripts (except for list), and  secrets  are  communi‐
77       cated via stdin/stdout (where applicable). Driver options list, lookup,
78       store, and delete serve to install the scripts:
79
80       [secrets]
81       driver = "shell"
82
83       [secrets.opts]
84       list =
85       lookup =
86       store =
87       delete =
88
89
90

EXAMPLES

92       $ podman secret create my_secret ./secret.json
93       $ podman secret create --driver=file my_secret ./secret.json
94       $ printf <secret> | podman secret create my_secret -
95
96
97

SEE ALSO

99       podman(1), podman-secret(1), podman-login(1)
100
101

HISTORY

103       January  2021,  Originally  compiled  by  Ashley  Cui   acui@redhat.com
104       ⟨mailto:acui@redhat.com⟩
105
106
107
108                                                       podman-secret-create(1)
Impressum