Before running metasploit framework on kali you should first setup the msfdb (database)
Start postgresql-service
systemctl start postgresql.service
Set up database (msfdb)
msfdb init
If you want to make postgresql automatically run on system startup enable it by executing the following command
systemctl enable postgresql.service
Start metasploit
msfconsole