I am writing a deployment for xwiki with mysql on kubernetes. In the setup instructions, the command for running xwiki is given as
docker run --net=xwiki-nw --name xwiki -p 8080:8080 -v /my/own/xwiki:/usr/local/xwiki -e DB_USER=xwiki -e DB_PASSWORD=xwiki -e DB_DATABASE=xwiki -e DB_HOST=mysql-xwiki xwiki:mysql-tomcat
I can't seem to find anything online or in the kubernetes documentation for how to control these argument flags that go with the docker run command.
Is there therefore no way to use this container correctly in a deployment, or am I missing something?
Please refer the following doc's for reference
For defining env vars:
https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
For defining Command and Arguments for a Container:
https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
for persistent-volumes:
https://kubernetes.io/docs/concepts/storage/persistent-volumes/
I don't have much experience in xwiki but I can shed some light.
--net
as well as --name
-p
in your deployment-v
is used for. If this is just for reading some configuration, you need a ConfigMap in Kubernetes-e
can be stored in a ConfigMap and included in your Deployment.I suggest you have a look at a sample deployment: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/