You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [Secrets design document](https://git.k8s.io/community/contributors/design-proposals/auth/secrets.md) for more information.
21
-
22
15
A Secret is an object that contains a small amount of sensitive data such as
23
16
a password, a token, or a key. Such information might otherwise be put in a
24
-
Pod specification or in an image. Users can create Secrets and the system
25
-
also creates some Secrets.
17
+
{{< glossary_tooltip term_id="pod" >}} specification or in a
18
+
{{< glossary_tooltip text="container image" term_id="image" >}}. Using a
19
+
Secret means that you don't need to include confidential data in your
20
+
application code.
21
+
22
+
Because Secrets can be created independently of the Pods that use them, there
23
+
is less risk of the Secret (and its data) being exposed during the workflow of
24
+
creating, viewing, and editing Pods. Kubernetes, and applications that run in
25
+
your cluster, can also take additional precautions with Secrets, such as
26
+
avoiding writing confidential data to nonvolatile storage.
27
+
28
+
Secrets are similar to {{< glossary_tooltip text="ConfigMaps" term_id="configmap" >}}
29
+
but are specifically intended to hold confidential data.
26
30
27
31
{{< caution >}}
28
-
Kubernetes Secrets are, by default, stored as unencrypted base64-encoded
29
-
strings. By default they can be retrieved - as plain text - by anyone with API
30
-
access, or anyone with access to Kubernetes' underlying data store, etcd. In
31
-
order to safely use Secrets, it is recommended you (at a minimum):
32
+
Kubernetes Secrets are, by default, stored unencrypted in the API server's underlying data store (etcd). Anyone with API access can retrieve or modify a Secret, and so can anyone with access to etcd.
33
+
Additionally, anyone who is authorized to create a Pod in a namespace can use that access to read any Secret in that namespace; this includes indirect access such as the ability to create a Deployment.
34
+
35
+
In order to safely use Secrets, take at least the following steps:
32
36
33
37
1.[Enable Encryption at Rest](/docs/tasks/administer-cluster/encrypt-data/) for Secrets.
34
-
2.[Enable or configure RBAC rules](/docs/reference/access-authn-authz/authorization/) that restrict reading and writing the Secret. Be aware that secrets can be obtained implicitly by anyone with the permission to create a Pod.
38
+
2. Enable or configure [RBAC rules](/docs/reference/access-authn-authz/authorization/) that
39
+
restrict reading data in Secrets (including via indirect means).
40
+
3. Where appropriate, also use mechanisms such as RBAC to limit which principals are allowed to create new Secrets or replace existing ones.
41
+
35
42
{{< /caution >}}
36
43
37
44
<!-- body -->
@@ -47,6 +54,10 @@ A Secret can be used with a Pod in three ways:
47
54
- As [container environment variable](#using-secrets-as-environment-variables).
48
55
- By the [kubelet when pulling images](#using-imagepullsecrets) for the Pod.
49
56
57
+
The Kubernetes control plane also uses Secrets; for example,
58
+
[bootstrap token Secrets](#bootstrap-token-secrets) are a mechanism to
Copy file name to clipboardExpand all lines: content/en/docs/concepts/workloads/controllers/daemonset.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,6 +230,8 @@ storage servers).
230
230
Use a Deployment for stateless services, like frontends, where scaling up and down the
231
231
number of replicas and rolling out updates are more important than controlling exactly which host
232
232
the Pod runs on. Use a DaemonSet when it is important that a copy of a Pod always run on
233
-
all or certain hosts, and when it needs to start before other Pods.
233
+
all or certain hosts, if the DaemonSet provides node-level functionality that allows other Pods to run correctly on that particular node.
234
+
235
+
For example, [network plugins](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) often include a component that runs as a DaemonSet. The DaemonSet component makes sure that the node where it's running has working cluster networking.
0 commit comments