A Kubernetes Secret is an API object for small pieces of sensitive data, such as passwords, tokens, SSH keys and registry credentials. It keeps that data out of container images and pod specs. Values are base64-encoded, not encrypted, by default. Keeping them safe depends on RBAC, encryption at rest and how secrets reach the cluster in the first place.
The posts start with the Secret API resource and a side-by-side comparison of ConfigMap and Secret, including data vs stringData and decoding base64 values. Image pull guides show how to create a docker-registry secret and use imagePullSecrets in plain YAML or Helm. One of them configures a GitLab chart to pull from a private Nexus registry, and another covers fixes for ImagePullBackOff and 401 errors. A large group covers External Secrets Operator: an introduction, the workflow from AWS Systems Manager Parameter Store to an ExternalSecret, a working example, a command reference, and comparisons of SecretStore vs ClusterSecretStore and ExternalSecret vs ClusterExternalSecret. Two OpenShift labs use Secrets to configure PostgreSQL deployments, one from the oc CLI and one from the web console.
The guides help developers who need to get credentials into applications and platform engineers who sync secrets from external secret managers.
Start here
- Kubernetes Secret Explained: Secret API Resource, YAML Example, and Use Cases – What a Secret is, what it stores and a basic YAML example of the resource.
- Kubernetes ConfigMap vs Secret — Updated Reference for Kubernetes – When to use ConfigMap or Secret, with data vs stringData and base64 decoding.
- Kubernetes: Pull an Image from a Private Registry using Yaml and Helm File – imagePullSecrets in YAML and Helm, plus fixes for ImagePullBackOff and 401 errors.
- OpenShift Lab 8: Work with Databases in OpenShift Using the oc CLI Tool – Hands-on lab that uses a Secret to configure a real PostgreSQL deployment.
- Introduction of External Secrets Operator – Short overview of how External Secrets Operator brings external secrets into a cluster.
- External Secrets Operator Workflow – End-to-end flow from AWS Parameter Store to an ExternalSecret object.
- External Secrets Operator: Example of ExternalSecret – Working ExternalSecret manifest to adapt for your own provider.
- External Secrets Operator: Difference between ClusterSecretStore and SecretStore? – Choosing namespaced or cluster-wide secret stores for shared secrets.
Latest Kubernetes Secrets articles
Kubernetes: Pull an Image from a Private Registry using Yaml and Helm File
Kubernetes pulls images from a private registry using a kubernetes.io/dockerconfigjson Secret. A Pod references that Secret through imagePullSecrets, either directly or through its ServiceAccount. This page shows…
Kubernetes ConfigMap vs Secret — Updated Reference for Kubernetes
As of July 4, 2026, the current stable upstream Kubernetes line is Kubernetes v1.36, with v1.36.2 released on June 9, 2026. Kubernetes v1.37 is in release-cycle/pre-release status,…
Kubernetes Secret Explained: Secret API Resource, YAML Example, and Use Cases
What is Kubernetes SecretsA Secret is an object that contains a small amount of sensitive data such as a password, a token, or a key. Objects of…
OpenShift Lab 9: Work with Databases in the OpenShift Web Console
Lab Goal In this lab, you will deploy a PostgreSQL database on OpenShift Local using the OpenShift web console. You will create the database using modern OpenShift…
OpenShift Lab 8: Work with Databases in OpenShift Using the oc CLI Tool
Lab Objective In this lab, you will deploy a PostgreSQL database in OpenShift using the oc CLI tool. You will learn how to: Important Concept A database…
External Secrets Operator Commands Referenece
Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…
External Secrets Operator: Example of ExternalSecret
Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…
External Secrets Operator: Difference between ClusterExternalSecret Vs ExternalSecret
The main difference between a ClusterExternalSecret and an ExternalSecret is that a ClusterExternalSecret is a cluster-wide ExternalSecret that can be used to push an ExternalSecret to all…
External Secrets Operator: Difference between ClusterSecretStore and SecretStore?
The main difference between a ClusterSecretStore and a SecretStore is that a ClusterSecretStore is a cluster-wide SecretStore that can be referenced from all namespaces, while a SecretStore…
External Secrets Operator Workflow
When using External Secrets Operator with Kubernetes, you typically do not manually create a Kubernetes Secret. Instead, the External Secrets Operator automatically generates the Kubernetes Secret based…
Introduction of External Secrets Operator
Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…
How to configure gitlab chart with private nexus registry for images
To configure GitLab chart with a private Nexus registry for images, you will need to do the following: kubectl create secret docker-registry nexus-registry \ –docker-server=<your-nexus-registry-url> \ –docker-username=<your-nexus-registry-username>…
Kubernetes Secrets: frequently asked questions
Are Kubernetes Secrets encrypted?
Not by default. Secret values are base64-encoded and stored in etcd. To protect them, enable encryption at rest with an EncryptionConfiguration or a KMS provider, and limit access to Secrets with RBAC.
What is the difference between a ConfigMap and a Secret?
Both hold key-value configuration that pods can use as environment variables or mounted files. Secrets are for sensitive data, and Kubernetes handles them more carefully, for example by mounting them on tmpfs and allowing stricter RBAC. ConfigMaps are for non-sensitive settings.
How do I decode a Kubernetes Secret value?
Read the encoded field and pipe it through base64, for example kubectl get secret mysecret -o jsonpath='{.data.password}' | base64 --decode.
What does External Secrets Operator do?
It reads secrets from external systems such as AWS Secrets Manager, AWS Systems Manager Parameter Store or HashiCorp Vault and syncs them into native Kubernetes Secrets. A SecretStore or ClusterSecretStore defines the provider connection, and an ExternalSecret defines which values to sync.
