# You can generate the Secret object on your Kubernetes cluster directly, which is more secure
# Use "kubectl create secret generic ..." and provide keys and values
# Or you can generate the encoded values manually and add them to a file like this one
# See https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-using-kubectl-create-secret

# Secrets in this file are referenced throughout our application as environment variables

# The plain text values in the comments are included for the demo
# Do not include the plain text values in a production environment

apiVersion: v1
# https://kubernetes.io/docs/concepts/configuration/secret/
kind: Secret
# Other Kubernetes objects in the cluster can reference values from our Secret
# using name: mysql-credentials and key: <somekey>, like key: user
metadata:
  name: mysql-credentials
  labels:
    "mukesh/example": lamp
type: Opaque
# Encode secrets exactly like this from your command line
# if you use a different command, you will run into errors with newlines
data:
  # root password for MySQL
  # the actual password is varMyRootPass
  # echo -n varMyRootPass | base64
  rootpw: dmFyTXlSb290UGFzcw==
  # user for MySQL
  # the actual username is varMyDBUser
  # echo -n varMyDBUser | base64
  user: dmFyTXlEQlVzZXI=
  # password for the second MySQL user
  # the actual password is varMyDBPass
  # echo -n varMyDBPass | base64
  password: dmFyTXlEQlBhc3M=
