kubectl create secret creates Kubernetes Secret resources from command-line values or files. Use Secrets instead of ConfigMaps for sensitive application data, and specify the Secret type immediately after the command. section 8.3.2
Create credentials and generate a manifest
kubectl create secret generic my-credentials --from-literal user=my-username --from-literal pass=my-password --dry-run=client -o yaml produces a Secret manifest. For plain-text input in a manifest, use stringData instead of data; stringData is write-only and only sets values. section 8.3.2
