Dealing with secrets

  • Secrets are used to store sensitive information like passwords or keys. 
  • Secrets are stored in an encoded format.

          kubectl create secret generic  <secrete-name> –from-literal=<key>=<value>

Task by trainer

1) Deploy mysql with secrets

  1. Create secret
  2. Secret name= mysql-db
  3. DB_HOST=localhost 
  4. ROOT_PASSWORD=centos    

2)  Create a mysql.yml file to deploy mysql deployment using secret mysql-db.

  1. Deployment name = mysql-deployment
  2. Image name = mysql:5.7