Kubernetes Cluster Configuration Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 21: Line 21:
===kubernetes.io/service-account-token===
===kubernetes.io/service-account-token===


Accessible on pods as <tt>/var/run/secrets/kubernetes.io/serviceaccount</tt>
Accessible on pods as <tt>/var/run/secrets/kubernetes.io/serviceaccount</tt>.


==Secrets Operations==
==Secrets Operations==
* [[Kubernetes_Secrets_Operations#With_kubectl_CLI|Create a Secret with kubectl CLI]]
* [[Kubernetes_Secrets_Operations#With_kubectl_CLI|Create a Secret with kubectl CLI]]
* [[Kubernetes_Secrets_Operations#From_a_Manifest|Create a Secret from a manifest]]
* [[Kubernetes_Secrets_Operations#From_a_Manifest|Create a Secret from a manifest]]

Revision as of 21:58, 22 August 2019

Internal

Secrets

Secrets

A secret is a mechanism, backed by a Kubernetes API resource, that allows applications running on a Kubernetes cluster to safely manage, store and access security-sensitive information such as passwords, OAuth tokens and ssh keys. This mechanism provides a better alternative to placing that information in a container image or in the pod metadata. An individual secret contains a small amount of data, limited to 1 MiB - this is to discourage creation of very large secrets that would exhaust API server and kubelet memory. Entire multi-line configuration files can be exposed as secrets.

Secrets are consumed by applications, and they can be exposed to pods in two ways:

A pod must explicitly reference a secret in its manifest to access it. If that does not happen, the system will not initialize the infrastructure that exposes the information to the pod.

Secrets can also be used by other parts of the system, without being directly exposed to pods.

Secret Types

Opaque

kubernetes.io/service-account-token

Accessible on pods as /var/run/secrets/kubernetes.io/serviceaccount.

Secrets Operations