Mesmo após definir as variáveis de ambiente, o container fica restartando.
NAME READY STATUS RESTARTS
db-noticias 0/1 CrashLoopBackOff 7
O describe:
Name: db-noticias
Namespace: default
Priority: 0
Node: minikube/192.168.99.100
Start Time: Sat, 03 Oct 2020 10:51:37 -0300
Labels: app=db-noticias
Annotations: <none>
Status: Running
IP: 172.17.0.5
IPs:
IP: 172.17.0.5
Containers:
db-noticias-container:
Container ID: docker://189a887162539a20f952867f541605bcf95e99a85ee7447eeefd6d24fdf950dd
Image: aluracursos/mysql-db:1
Image ID: docker-pullable://aluracursos/mysql-db@sha256:950ccdfe67553da34946fa7a9f938e50ab9727ebed37b43a0307421df1398c09
Port: 3306/TCP
Host Port: 0/TCP
State: Running
Started: Sat, 03 Oct 2020 11:24:23 -0300
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Sat, 03 Oct 2020 11:16:10 -0300
Finished: Sat, 03 Oct 2020 11:19:09 -0300
Ready: True
Restart Count: 7
Environment:
MYSQL_ROOT_PASSWORD: q1w2e3r4
MYSQL_DATABASE: empresa
MYSQL_PASSWORD: q1w2e3r4
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-n66kq (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
default-token-n66kq:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-n66kq
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 33m default-scheduler Successfully assigned default/db-noticias to minikube
Normal Pulled 14m (x6 over 33m) kubelet Container image "aluracursos/mysql-db:1" already present on machine
Normal Created 14m (x6 over 33m) kubelet Created container db-noticias-container
Normal Started 14m (x6 over 32m) kubelet Started container db-noticias-container
Warning BackOff 2m52s (x36 over 23m) kubelet Back-off restarting failed container