You should ensure that you add the DOKS cluster as a Trusted Source (In cloud: go to the cluster –> Settings –> Edit Trusted Sources). After that you should be able to connect to your database.
annotations:
kubernetes.io/ingress.class: "nginx"
docker exec -ti php-fpm cat /usr/local/etc/php/php.ini