Skip to content

Commit 7efb54a

Browse files
committed
add devcontainer-k8s and move notes
1 parent ca0dc3b commit 7efb54a

File tree

7 files changed

+42
-27
lines changed

7 files changed

+42
-27
lines changed

examples/templates/aws-linux/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,14 @@ instances provisioned by Coder:
7979

8080
## Architecture
8181

82-
> **Note**
83-
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
84-
8582
This template provisions the following resources:
8683

8784
- AWS Instance
8885

8986
Coder uses `aws_ec2_instance_state` to start and stop the VM. This example template is fully persistent, meaning the full filesystem is preserved when the workspace restarts. See this [community example](https://github.com/bpmct/coder-templates/tree/main/aws-linux-ephemeral) of an ephemeral AWS instance.
9087

91-
To get started, run `coder templates init`. When prompted, select this template.
92-
Follow the on-screen instructions to proceed.
88+
> **Note**
89+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
9390
9491
## code-server
9592

examples/templates/aws-windows/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,14 @@ instances provisioned by Coder:
7979

8080
## Architecture
8181

82-
> **Note**
83-
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
84-
8582
This template provisions the following resources:
8683

8784
- AWS Instance
8885

8986
Coder uses `aws_ec2_instance_state` to start and stop the VM. This example template is fully persistent, meaning the full filesystem is preserved when the workspace restarts. See this [community example](https://github.com/bpmct/coder-templates/tree/main/aws-linux-ephemeral) of an ephemeral AWS instance.
9087

91-
To get started, run `coder templates init`. When prompted, select this template.
92-
Follow the on-screen instructions to proceed.
88+
> **Note**
89+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
9390
9491
## code-server
9592

examples/templates/azure-linux/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ authenticate, [consult the Terraform docs](https://registry.terraform.io/provide
2424

2525
## Architecture
2626

27-
> **Note**
28-
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
29-
3027
This template provisions the following resources:
3128

3229
- Azure VM (ephemeral, deleted on stop)
3330
- Managed disk (persistent, mounted to `/home/coder`)
3431

3532
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the VM image, or use a [startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script). Alternatively, individual developers can [personalize](https://coder.com/docs/v2/latest/dotfiles) their workspaces with dotfiles.
3633

34+
> **Note**
35+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
36+
3737
## code-server
3838

3939
`code-server` is installed via the `startup_script` argument in the `coder_agent`

examples/templates/azure-windows/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ authenticate, [consult the Terraform docs](https://registry.terraform.io/provide
2424

2525
## Architecture
2626

27-
> **Note**
28-
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
29-
3027
This template provisions the following resources:
3128

3229
- Azure VM (ephemeral, deleted on stop)
3330
- Managed disk (persistent, mounted to `F:`)
3431

3532
This means, when the workspace restarts, any tools or files outside of the data directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the VM image, or use a [startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script).
33+
34+
> **Note**
35+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.

examples/templates/devcontainer-kubernetes/README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,34 @@ verified: true
77
tags: [container, kubernetes, devcontainer]
88
---
99

10-
# devcontainer-kubernetes
10+
# Remote Development on Kubernetes Pods (with Devcontainers)
1111

12-
Develop using [devcontainers](https://containers.dev) in Kubernetes.
12+
Provision Kubernetes Pods as [Coder workspaces](https://coder.com/docs/coder-v2/latest) with this example template.
1313

14-
To get started, run `coder templates init`. When prompted, select this template.
15-
Follow the on-screen instructions to proceed.
14+
<!-- TODO: Add screenshot -->
1615

17-
## How it works
16+
## Prerequisites
17+
18+
### Infrastructure
19+
20+
**Cluster**: This template requires an existing Kubernetes cluster
21+
22+
**Container Image**: This template uses the [codercom/enterprise-base:ubuntu image](https://github.com/coder/enterprise-images/tree/main/images/base) with some dev tools preinstalled. To add additional tools, extend this image or build it yourself.
23+
24+
### Authentication
25+
26+
This template authenticates using a `~/.kube/config`, if present on the server, or via built-in authentication if the Coder provisioner is running on Kubernetes with an authorized ServiceAccount. To use another [authentication method](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#authentication), edit the template.
27+
28+
## Architecture
1829

1930
Coder supports devcontainers with [envbuilder](https://github.com/coder/envbuilder), an open source project. Read more about this in [Coder's documentation](https://coder.com/docs/v2/latest/templates/devcontainers).
31+
32+
This template provisions the following resources:
33+
34+
- Kubernetes pod (ephemeral)
35+
- Kubernetes persistent volume claim (persistent on `/home/coder`)
36+
37+
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the container image. Alternatively, individual developers can [personalize](https://coder.com/docs/v2/latest/dotfiles) their workspaces with dotfiles.
38+
39+
> **Note**
40+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.

examples/templates/docker/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ sudo -u coder docker ps
3232

3333
## Architecture
3434

35-
> **Note**
36-
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
37-
3835
This template provisions the following resources:
3936

4037
- Docker image (built by Docker socket and kept locally)
@@ -43,6 +40,9 @@ This template provisions the following resources:
4340

4441
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the container image. Alternatively, individual developers can [personalize](https://coder.com/docs/v2/latest/dotfiles) their workspaces with dotfiles.
4542

43+
> **Note**
44+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
45+
4646
### Editing the image
4747

4848
Edit the `Dockerfile` and run `coder templates push` to update workspaces.

examples/templates/kubernetes/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ This template authenticates using a `~/.kube/config`, if present on the server,
2727

2828
## Architecture
2929

30-
> **Note**
31-
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
32-
3330
This template provisions the following resources:
3431

3532
- Kubernetes pod (ephemeral)
3633
- Kubernetes persistent volume claim (persistent on `/home/coder`)
3734

3835
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the container image. Alternatively, individual developers can [personalize](https://coder.com/docs/v2/latest/dotfiles) their workspaces with dotfiles.
36+
37+
> **Note**
38+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.

0 commit comments

Comments
 (0)