How to generate key and pem file

I am developing nwdaf funciton, and want to know how to generate my own ssl pem file

The openssl tool can help you generate SSL Certificate.