From the course: Automating Kubernetes with GitOps

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Using secrets

Using secrets

- In this video, we'll talk about Secrets. So first thing to realize is that the Secret is not Secret. A Secret is Base64 encoded. And Base64 encoding looks like encryption. It is not. Using Base64 encoding on a Secret allows for storage of binary data as ASCII strings. And that is what Secrets are for. Because without Base64 encoding, it's not possible to store binary configuration data such as TLS certificates in the Kubernetes at CD database. So what's the use case for a Secret? Well, a Secret is used to separate configuration from the container images. And the main reason for using Secrets is to encode binary data in a sortable format. And for the rest of it, Secrets are as insecure as config maps. Now how do we use them? Well, Secrets are used in three different ways. They can be mounted as volumes in a Pod. They can be set as environment variables. They can also be retrieved directly from the Kubernetes API. If you want to provide environment variables, environment variables are…

Contents