I used this github repository to create a Wordpess, but I have a question:
After the deployment, view logs wordPress tips are not connected to the database:
[root@master k11]# kubectl logs wordpress WordPress not found in /var/www/html - copying now... WARNING: /var/www/html is not empty - press Ctrl+C now if this is an error!
ls -A .htaccess sleep 10 Complete! WordPress has been successfully copied to /var/www/html
Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
The docker-compose connection database has the Linx field, but there is no k8s below this field, how to find the hostname MySQL?
docker-compose.yaml
links:
- db:mysql
Please check wp-config file for proper Database name and user details