Kubernetes 101 : Secret object as environment variables of the pods
We normally don't build sensitive information like password inside the image.
In our example, we store them in a kubernetes object called secret, then we make them available to our pod through environment variables.
We start by creating a secret object using the command line, as below:
We, then create the pod that will be using our secret object "secret_1"as below:
"kubectl exec" executes a command inside a running pod, the command appears after the characters "--".
Comments