I am trying to deploy Magento using Kubernetes and when I try to access the application I am getting following
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 7b2c0442c678fc4aebf2889b29313a808742bc6eeaa162d96e5de9ada7f48ac3
When I run kubectl -n magento exec magento-php-7cd6df7c98-rngv7 cat var/report/7b2c0442c678fc4aebf2889b29313a808742bc6eeaa162d96e5de9ada7f48ac3 I get following
{"0":"Please upgrade your database: Run \"bin\/magento setup:upgrade\" from the Magento root directory.\nThe following modules are outdated:\nMagento_AuthorizenetAcceptjs data: current version - non
As suggested when I try to run kubectl -n magento exec magento-php-7cd6df7c98-rngv7 php bin/magento setup:upgrade I am getting following
Use 'kubectl describe pod/magento-php-7cd6df7c98-rngv7 -n magento' to see all of the containers in this pod.Cache cleared successfully File system cleanup:FilesystemIterator::__construct(/var/www/html/pub/static/lost+found):
failed to open dir: Permission denied command terminated with exit code 1
Install.yaml looks like following
spec:
containers:
- name: magento-setup
image: kiweeteam/magento2:vanilla-2.3.4-php7.3-fpm
securityContext:
runAsUser: 0
command: ["/bin/sh"]
args:
- -c
- |
chown -R www-data:www-data /var/www/html/pub/*
/bin/bash <<'EOF'
bin/install.sh
php bin/magento setup:perf:generate-fixtures setup/performance-toolkit/profiles/ce/small.xml
magerun index:list | awk '{print $2}' | tail -n+4 | xargs -I{} magerun index:set-mode schedule {}
magerun cache:flush
EOF