liveBook · Manning

Kubernetes Secret

As explained in Machine Learning Platform Engineering

A Kubernetes Secret is an API object for storing and supplying sensitive data to workloads.

A Kubernetes Secret is an API object for storing sensitive values and supplying them to workloads. A typical Secret uses apiVersion v1, kind Secret, an object name, type Opaque, and data fields whose values are represented as base64 strings.

Credential Secret

The test-secret object stores database_username and database_password under type Opaque. A kubectl template command retrieves one field and pipes it to base64 -d for inspection.

How Machine Learning Platform Engineering covers it

How deep it goes
Defines a v1 YAML object, creates and inspects it with kubectl, and demonstrates field retrieval and workload references.
Examples
Uses test-secret with database credentials, kubectl inspection commands, and base64 encoding and decoding demonstrations.
What you can do after
Apply it via kubectl, inspect stored fields, and reference credential keys from container environment variables.
How it connects
Connects Secrets with Pods, containers, environment variables, ConfigMaps, and Kubernetes namespaces.

Also explained in

Compare how 6 books explain Kubernetes Secret →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.