I have the following configuration to deploy phpmyadmin to kubernetes.I have two problems with this:
- When the pod goes up it doesn't start the apache, I have to run
service apache2 start - when I enter phpmyadmin I find that it has not taken the environment variable PMA_HOST that is pointing to the IP where the database is up and running
apiVersion: apps/v1
kind: Deployment
metadata:
name: phpmyadmin
labels:
app: phpmyadmin
spec:
replicas: 1
selector:
matchLabels:
app: phpmyadmin
template:
metadata:
labels:
app: phpmyadmin
spec:
containers:
- name: phpmyadmin
image: phpmyadmin/phpmyadmin:5
ports:
- containerPort: 80
protocol: TCP
env:
- name: PMA_HOST
value: MY_DATABASE_IP

I did a test with a Docker pointing to the same database and it works fine
docker run --name myadmin -d -e PMA_HOST=MY_DATABASE_IP -p 8080:80 phpmyadmin/phpmyadmin:5
