title: Passing Docker container's run parameters in Kubernetes
body: <p>I have two containers (GitLab and PostgreSQL) running on RancherOS v1.0.3. I would like to make them part of Kubernetes cluster.</p>
  
  <pre><code>[rancher@rancher-agent-1 ~]$ cat postgresql.sh
  docker run --name gitlab-postgresql -d \
      --env 'POSTGRES_DB=gitlabhq_production' \
      --env 'POSTGRES_USER=gitlab' --env 'POSTGRES_PASSWORD=password' \
      --volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \
      postgres:9.6-2
  
  
  [rancher@rancher-agent-1 ~]$ cat gitlab.sh
  docker run --name gitlab -d \
      --link gitlab-postgresql:postgresql \
      --publish 443:443 --publish 80:80 \
      --env 'GITLAB_PORT=80' --env 'GITLAB_SSH_PORT=10022' \
      --env 'GITLAB_SECRETS_DB_KEY_BASE=64-char-key-A' \
      --env 'GITLAB_SECRETS_SECRET_KEY_BASE=64-char-key-B' \
      --env 'GITLAB_SECRETS_OTP_KEY_BASE=64-char-key-C' \
      --volume /srv/docker/gitlab/gitlab:/home/git/data \
      sameersbn/gitlab:9.4.5
  </code></pre>
  
  <p>Queries:<br>
  1) I have some idea about how to use YAML files to provision pods, replication controller etc. but i am not sure how to pass the above <code>docker run</code> parameters to Kubernetes so that it can apply the same to image(s) correctly.</p>
  
  <p>2) I'm not sure whether <code>--link</code> argument (used in <code>gitlab.sh</code> above) also need to be passed in Kubernetes. Although i am currently deploying both containers on single host but will be creating cluster of each (PostgreSQL and GitLab) later, so just wanted to confirm whether inter-host communication will automatically be taken care of by Kubernetes. If not, then what options can be explored?</p>