Meu sistema de noticia não carrega corretamente, já refiz varias vezes as imagens docker mais continua com erro e quando clico no painel ele sempre redireciona para o localhost. Desde de já agradeço o retorno segue os arauivos yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: aplicacao-sistema-deployment
spec:
selector:
matchLabels:
name: aplicacao-sistema-pod
template:
metadata:
labels:
name: aplicacao-sistema-pod
spec:
containers:
- name: container-aplicacao-sistema
image: joaopauloyhwh/noticia-alura:v2
ports:
- containerPort: 80
apiVersion: apps/v1
kind: Deployment
metadata:
name: aplicacao-noticia-deployment
spec:
selector:
matchLabels:
name: aplicacao-noticia-pod
template:
metadata:
labels:
name: aplicacao-noticia-pod
spec:
containers:
- name: container-aplicacao
image: joaopauloyhwh/noticia-alura:v1
ports:
- containerPort: 80
apiVersion: v1
kind: Service
metadata:
name: servico-aplicacao-sistema
spec:
type: LoadBalancer
ports:
- name: http
port: 80
selector:
name: aplicacao-sistema-pod
apiVersion: v1
kind: Service
metadata:
name: servico-aplicacao-noticia
spec:
type: LoadBalancer
ports:
- name: http
port: 80
selector:
name: aplicacao-noticia-pod
FROM jnlucas/image-phpmysql:latest
# Utilizado para portal de noticia
#COPY noticias /var/www/html
# Utilizado para sistema de noticia
COPY sistema /var/www/html
erro aplicacao sistema:
PDOException Object ( [message:protected] => SQLSTATE[HY000] [2002] Connection timed out [string:Exception:private] => [code:protected] => 2002 [file:protected] => /var/www/html/funcoes.php [line:protected] => 7 [trace:Exception:private] => Array ( [0] => Array ( [file] => /var/www/html/funcoes.php [line] => 7 [function] => __construct [class] => PDO [type] => -> [args] => Array ( [0] => mysql:host=192.168.0.101;dbname=empresa [1] => root [2] => q1w2e3r4 ) ) [1] => Array ( [file] => /var/www/html/index.php [line] => 6 [args] => Array ( [0] => /var/www/html/funcoes.php ) [function] => include ) ) [previous:Exception:private] => [errorInfo] => )