[create a public private key pair]
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /d/tmp/nginx.key -out /d/tmp/nginx.crt -subj "/CN=my-nginx/O=my-nginx"

[convert the keys to base64 encoding]
$ cat /d/tmp/nginx.crt | base64
$ cat /d/tmp/nginx.key | base64

[create an tls secret using CLI]
$ kubectl create secret tls nginxsecret --key /tmp/nginx.key --cert /tmp/nginx.crt

[list]
$ kubectl get secrets
NAME                  TYPE                                  DATA      AGE
nginxsecret           kubernetes.io/tls                     2         1m
