Basically I want to deploy a discuz forum to my k8s cluster with below image https://hub.docker.com/r/skyzhou/docker-discuz/
the mysql image is easy to deploy but the discuz forum doesn't provide any env variable for me to inject for datase, it is only allowed for links parameter,
The question is on k8s cluster there is no such way for me to inject this, so it is stuck.
The wordpress blog could expose the db-host and db_password parameter.
I have successfully deployed to my cluster and the port is set to 80 though I wish to expose it to 8080 not sure how.@Matthew L Daniel
The MYSQL_PORT_3306_TCP
variable is used in a misleading way, as one can see where it is stripped of the leading tcp://
and used as DISCUZ_DB_HOST
Thus, I would expect:
containers:
- name: discuz
image: skyzhou/docker-discuz
env:
- name: MYSQL_PORT_3306_TCP
value: $(SERVICE_MYSQL_HOST):$(SERVICE_MYSQL_PORT)
should do the trick if you already have a mysql
Service in kubernetes, or simply fill in the host and port if you already know them