Getting Started with Secrets

Learn about Kubernetes Secrets.

We'll cover the following

Understanding Secrets

Note: We cannot treat all information equally. Sensitive data needs to be handled with additional care. Kubernetes provides an additional level of protection through Secrets.

A Secret is a relatively small amount of sensitive data. Some of the typical candidates for Secrets would be passwords, tokens, and SSH keys.

Kubernetes Secrets are very similar to ConfigMaps. If you compare the differences in the syntax, you’ll notice that there are only a few (if any). Conceptually, ConfigMaps and Secrets are, more or less, the same. If you are familiar with ConfigMaps, you should have no trouble applying that knowledge to Secrets.

Note: We have already used Secrets without even knowing. Every Pod we created so far had a Secret mounted automatically by the system.

We’ll start by exploring auto-generated Secrets and proceed to produce some ourselves.

Get hands-on with 1200+ tech skills courses.