Skip to content

Commit 39873db

Browse files
committed
Note to justify outside rp, bullets for alternative solutions and some typos
1 parent 4bfe085 commit 39873db

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

posts/running-coder-in-k3s/index.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,28 @@ This post aims at describing the deployment of [Coder](https://coder.com/) on a
1010

1111
[Coder](https://coder.com/) is an online development environment platform that offers the possibility to code directly from a web browser. All the compilation toolchain is then deported on the server. [Coder](https://coder.com/) provides a ready-to-use remote development environment and reduces the installation and configuration issues that could arise from the heterogeneity of developer's workstation architectures and software used.
1212

13-
This kind of solution has gained popularity in recent years, with several alternative solutions such as: [Gitpod](https://www.gitpod.io/), [EclipseCHE](https://www.eclipse.org/che/), [JupyterHub](https://jupyter.org/hub), [GitHub Codespaces](https://github.com/features/codespaces), or [Codeanywhere](https://codeanywhere.com/). These alternative solutions have a lot in common, but also some distinguishing features that can make them attractive.
13+
This kind of solution has gained popularity in recent years, with several alternative solutions such as:
14+
15+
* [Gitpod](https://www.gitpod.io/)
16+
* [EclipseCHE](https://www.eclipse.org/che/)
17+
* [JupyterHub](https://jupyter.org/hub)
18+
* [GitHub Codespaces](https://github.com/features/codespaces)
19+
* [Codeanywhere](https://codeanywhere.com/)
20+
21+
These alternative solutions have a lot in common, but also some distinguishing features that can make them attractive.
1422

1523
I am interested in deploying an online development platform within a higher education governmental institution. This platform is meant to be used by researchers and students. Several features are mandatory, such as self-hosting, open source, great community, ease of installation, and the ability to handle multiple programming languages.
1624

1725
A first experimentation was based on [Gitpod](https://www.gitpod.io/). Unfortunately, Gitpod no longer supports self-hosting, as explained on the [Gitpod blog](https://www.gitpod.io/blog/introducing-gitpod-dedicated). Furthermore, setting up [Gitpod](https://www.gitpod.io/) was not easy, and I can understand the choice made by [Gitpod](https://www.gitpod.io/) developers, as explained on the blog post, to drop support for self-hosting since there were many issues arising from the heterogeneity of Kubernetes distributions. A second solution was [JupyterHub](https://jupyter.org/hub), which was fairly easy to install but limited to the Python language. In a third experimentation, I therefore turned to [Coder](https://coder.com/). In this post I will explain how I deployed it on a [K3s](https://k3s.io/) cluster.
1826

19-
From a technical point of view, [Coder](https://coder.com/) provisions remote development environments via Terraform to supply users with Workspaces. For example, via Terraform, you can specify that you want to use a specific Docker image that contains the necessary compilation toolchain to build Java programs and that you want to install VIM as a code editor. Resources will also be specified, such as the memory or storage capacity of Workspaces. As for [K3s](https://k3s.io/), it is a lightweight Kubernetes distribution designed for production environments with limited resources, such as embedded systems. I appreciate [K3s](https://k3s.io/) because it is designed to be easy to install.
27+
[Coder](https://coder.com/) solution matches all features I need, because it is [self-hosted](https://coder.com/docs/v2/latest/install), [open source](https://github.com/coder) and has a great[Discord community](https://discord.com/invite/coder). From a technical point of view, [Coder](https://coder.com/) provisions remote development environments via Terraform to supply users with Workspaces. For example, via Terraform, you can specify that you want to use a specific Docker image that contains the necessary compilation toolchain to build Java programs and that you want to install VIM as a code editor. Resources will also be specified, such as the memory or storage capacity of Workspaces. As for [K3s](https://k3s.io/), it is a lightweight Kubernetes distribution designed for production environments with limited resources, such as embedded systems. I appreciate [K3s](https://k3s.io/) because it is designed to be easy to install.
2028

2129
The deployment of [Coder](https://coder.com/) on a [K3s](https://k3s.io/) cluster is broken down into the following steps:
2230

2331
* [Setup](#setup)
2432
* [Install k3s](#install-k3s)
2533
* [Deploy Coder](#deploy-coder)
26-
* [Deploy Reverse Proxy](#deploy-reverse-proxy)
34+
* [Deploy reverse-proxy](#deploy-reverse-proxy)
2735
* [NGINX](#nginx)
2836
* [Apache HTTP](#apache-http)
2937
* [Run and enjoy](#test-coder)
@@ -41,13 +49,15 @@ Before starting the [Coder](https://coder.com/) install process, you must have:
4149
* All machines are on the same vlan.
4250
* All machines have ports 22 (SSH), 80 (HTTP), 443 (HTTPS) and 6443 (Kubernetes) exposed.
4351
* A domain (coder.mydomain.com), a subdomain (*.coder.mydomain.com) and a configured DNS to redirect to `k3sserver`.
44-
* A reverse Proxy (Apache HTTP or NGINX) which will be hosted outside of the Kubernetes cluster.
45-
* A [Docker](https://www.docker.com/) installation on `k3sserver` to deploy the Reverse Proxy.
52+
* A reverse-proxy (Apache HTTP or NGINX) which will be hosted outside of the Kubernetes cluster.
53+
* A [Docker](https://www.docker.com/) installation on `k3sserver` to deploy the reverse-proxy.
4654

4755
* Locally
4856
* [kubectl](https://kubernetes.io/docs/reference/kubectl/)
4957
* [HELM](https://helm.sh/)
5058

59+
> **Note**: in the following infrastructure, I will present a configuration where TLS certificates will be managed by a reverse-proxy outside of Kubernetes. It is a **restriction** of my higher education governmental institution and I would like to reproduce the same setup and to show you this specific use case. But, I agree in many cases, the ingress could/should also be secured via [cert-manager](https://cert-manager.io/) or by passing TLS certificates in directly. It would be better to stay within the K8s infrastructure.
60+
5161
## Install [K3s](https://k3s.io/)
5262

5363
* Connect to the server node (`k3sserver`) and run:
@@ -250,11 +260,11 @@ coder-59c6bc9c77-6f2wj 1/1 Running 0 9m47s
250260

251261
> These instructions are based on the [Coder](https://coder.com/) website: https://coder.com/docs/v2/latest/install/kubernetes.
252262

253-
## Deploy Reverse Proxy
263+
## Deploy reverse-proxy
254264

255-
As mentioned in the introduction, a Reverse Proxy will be deployed outside of your Kubernetes cluster.
265+
As mentioned in the setup section, a reverse-proxy will be deployed outside of your Kubernetes cluster.
256266

257-
The Reverse Proxy will also be in charge of managing SSL/TLS certificates. Let's describe how to generate certificates with LetsEncrypt.
267+
The reverse-proxy will also be in charge of managing SSL/TLS certificates. Let's describe how to generate certificates with LetsEncrypt.
258268

259269
* Connect to the server node (`k3sserver`) and install Certbot:
260270

@@ -316,7 +326,7 @@ We suppose [Docker](https://www.docker.com/) is installed on the server node (`k
316326
$ docker network create reverseproxynetwork
317327
```
318328
319-
Two Reverse Proxy solutions will be presented: [NGINX](https://www.nginx.com/) and [Apache HTTP](https://httpd.apache.org/). Choose only ONE at your convenience.
329+
Two reverse-proxy solutions will be presented: [NGINX](https://www.nginx.com/) and [Apache HTTP](https://httpd.apache.org/). Choose only ONE at your convenience.
320330
321331
### NGINX
322332

0 commit comments

Comments
 (0)