Add info and link to good practices from caution
This commit is contained in:
parent
d8132bcd35
commit
b8ac776bce
|
|
@ -36,11 +36,12 @@ Additionally, anyone who is authorized to create a Pod in a namespace can use th
|
|||
In order to safely use Secrets, take at least the following steps:
|
||||
|
||||
1. [Enable Encryption at Rest](/docs/tasks/administer-cluster/encrypt-data/) for Secrets.
|
||||
1. [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.
|
||||
1. Where appropriate, also use mechanisms such as RBAC to limit which principals are allowed
|
||||
to create new Secrets or replace existing ones.
|
||||
1. [Enable or configure RBAC rules](/docs/reference/access-authn-authz/authorization/) with least-privilege access to Secrets.
|
||||
1. Restrict Secret access to specific containers.
|
||||
1. [Consider using external Secret store providers](https://secrets-store-csi-driver.sigs.k8s.io/concepts.html#provider-for-the-secrets-store-csi-driver).
|
||||
|
||||
For more guidelines to manage and improve the security of your Secrets, refer to
|
||||
[Good practices for Kubernetes Secrets](/docs/concepts/security/secrets-good-practices).
|
||||
|
||||
{{< /caution >}}
|
||||
|
||||
|
|
@ -174,7 +175,7 @@ systems on your behalf.
|
|||
|
||||
Secret volume sources are validated to ensure that the specified object
|
||||
reference actually points to an object of type Secret. Therefore, a Secret
|
||||
needs to be created before any Pods that depend on it.
|
||||
needs to be created before any Pods that depend on it.
|
||||
|
||||
If the Secret cannot be fetched (perhaps because it does not exist, or
|
||||
due to a temporary lack of connection to the API server) the kubelet
|
||||
|
|
@ -324,7 +325,7 @@ secret volume mount have permission `0400`.
|
|||
{{< note >}}
|
||||
If you're defining a Pod or a Pod template using JSON, beware that the JSON
|
||||
specification doesn't support octal notation. You can use the decimal value
|
||||
for the `defaultMode` (for example, 0400 in octal is 256 in decimal) instead.
|
||||
for the `defaultMode` (for example, 0400 in octal is 256 in decimal) instead.
|
||||
If you're writing YAML, you can write the `defaultMode` in octal.
|
||||
{{< /note >}}
|
||||
|
||||
|
|
@ -931,7 +932,7 @@ data:
|
|||
After creating the Secret, wait for Kubernetes to populate the `token` key in the `data` field.
|
||||
|
||||
See the [ServiceAccount](/docs/tasks/configure-pod-container/configure-service-account/)
|
||||
documentation for more information on how service accounts work.
|
||||
documentation for more information on how service accounts work.
|
||||
You can also check the `automountServiceAccountToken` field and the
|
||||
`serviceAccountName` field of the
|
||||
[`Pod`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)
|
||||
|
|
|
|||
Loading…
Reference in New Issue