Kubernetes provides two ways of creating secrets, as follows:
- Creating secrets from files
- Creating secrets from YAML and JSON definitions
Using any of the preceding methods, you can create three types of secrets:
- Generic secrets: These can be created using literal values in addition to the preceding two methods.
- Docker-registry credentials: These are used to pull images from the private registry.
- TLS certificates: These are used to store SSL certificates.