Read sensitive details as k8s secrets

How can one provide any desired resources in general as Kubernetes secrets from the .yaml file?