Create Kubernetes Secret object imperatively

From literal:

kubectl create secret generic app-secret --from-literal=PASSWORD1=passwd1 --from-literal=PASSWORD2=passwd2
From file:
kubectl create secret generic app-secret --from-file=app_secret.properties