# Installing on Kubernetes

**URL:** https://meta.discourse.org/t/installing-on-kubernetes/49329
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [August 27, 2016, 10:59pm UTC](https://meta.discourse.org/t/installing-on-kubernetes/49329 "2016-08-27T22:59:09Z")
**Posts on this page:** 1
**Showing post:** 27

<div class="post-metadata">

### Author: ![lucasbasquerotto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lucasbasquerotto/32/133376_2.png) [@lucasbasquerotto](https://meta.discourse.org/u/lucasbasquerotto)
#### Post date: [February 7, 2020, 6:37pm UTC](https://meta.discourse.org/t/installing-on-kubernetes/49329/27 "2020-02-07T18:37:28Z")

</div>

@Geoffrey_Challen You can create an image with the discourse repository and plugins, install the ruby gems and other dependencies and push it to a registry (like DockerHub). This repository would be **agnostic to the environment** and could be public (unless you include a private plugin or something of the sort). This base image could be used in staging and production environments and even in different projects (if they use the same plugins).

Steps like precompiling the assets, db migration and generating the ssl certificate should be executed in the target machine, though, to generate the final image.

I don’t know exactly how to include that in a k8s cluster tough. I went with the conservative approach and use it based on the official guide from the discourse team, just separating in 2 steps.

> [@Why is "rebuild" so tightly coupled to container run status?](https://meta.discourse.org/t/why-is-rebuild-so-tightly-coupled-to-container-run-status/136414/4):
>
> About updating discourse source, os level dependencies, the docker base image, ruby gems and the like, it’s possible to do that making the build in 2 steps, and run the aforementioned tasks in the 1st step. This first step is agnostic to the environment and could be run even in a CI environment (so you could use an almost identical image in staging and production environments, avoiding possible errors due to rebuilding in different dates, not to mention the reduced downtime). The db migration …

---

_[View the full topic](https://meta.discourse.org/t/installing-on-kubernetes/49329)._
