Setting up secrets management
All production applications require some secret information to function. Kubernetes has a pluggable Secrets back end to manage these secrets. Kubernetes also provides multiple ways of using the secrets in your Deployment. The ability to manage secrets and properly use the Secrets back end will make your services resistant to attacks.
We have used secrets in some of our Deployments in previous chapters. Mostly, we passed the secrets as a string in some kind of variable, or Helm took care of creating the secrets for us. In Kubernetes, secrets are a resource, just like Pods and ReplicaSets. Secrets are always tied to a specific namespace. Secrets have to be created in all the namespaces where you want to use them. In this section, we'll learn how to create, decode, and use our own secrets. We will start by using the built-in secrets from Kubernetes, and finish by leveraging Azure Key Vault to store secrets.
Creating your own secrets
Kubernetes...