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
- Create secret
- Secret name= mysql-db
- DB_HOST=localhost
- ROOT_PASSWORD=centos
2) Create a mysql.yml file to deploy mysql deployment using secret mysql-db.
- Deployment name = mysql-deployment
- Image name = mysql:5.7