Below you will find pages that utilize the taxonomy term “Security”
Kubernetes Service Accounts and Secrets - Mounting Secrets as Volumes
A Service Account provides an identity for processes that run in a pod. When processes inside a pod contact the API server, they are authenticated as a particular Service Account.
Create a Service Account using the YAML below.
apiVersion: v1
kind: ServiceAccount
metadata:
name: sa-app-name
namespace: namespace-name
Once the Service Account is created, you can reference it in your pod spec:
apiVersion: v1
kind: Pod
metadata:
name: app-name
spec:
serviceAccountName: sa-app-name
Now on to Kubernetes Secrets. A Secret lets you store and manage sensitive information. Here we’ll create two secrets for our tests: mysecret1 and mysecret2. Note the --- separator - without it, the second document silently overwrites the first.
Encrypting Secrets in Amazon EKS
In this talk, Paavan Mistry explains how to encrypt Kubernetes secrets at rest in etcd on Amazon EKS. By default, Kubernetes stores secrets only base64-encoded - not encrypted - so anyone who gains access to the API server or to etcd can read them in the clear. The talk shows how to use AWS KMS envelope encryption to protect secrets at rest, which is an easy win for anyone running EKS in production.