k8s part 6 (security) Flashcards
what are secrets in k8s?
secrets are used to store and manage sensitive information, such as passwords, token or a key, Instead of hardcoding this sensitive data in your application code.
what are the disadvantages of hard coding sensitive data in your application?
- Anyone with access can get to the data
- developer will always need this data if image has to be modified.
- Any update of the data will require a new image for the application
what are some other solutions for storing sensitive data ?
- AWS Secrets Manager
- HashiCorp Vault
- Azure Key Vault
List some types of secret?
- generic
- docker registry
- TLS
- Service Account Tokens
- Basic Authentication Secrets
- SSH Auth Secret
-Opaque Secrets
what are the two ways you can mount secrets to a pod?
- volume
- environment variables
what are configmaps?
a ConfigMap is a way to store configuration settings for applications in Kubernetes. Instead of hardcoding these settings into your application, you can put them in a ConfigMap, which makes it easier to manage and change the settings without having to modify the application code itself.
when you dont specify a service type, which one does k8s use by default?
clusterIP
what property do you use when setting an environment variable in k8s?
- env
- example name: app
value: nginx
configmaps store information in plain text T or F ?
T