You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After [installing Sysbox on Kubernetes](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/install-k8s.md), modify your template to use the sysbox-runc RuntimeClass.
41
-
42
-
> Currently, the official [Kubernetes Terraform Provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest) does not support specifying a custom RuntimeClass. [mingfang/k8s](https://registry.terraform.io/providers/mingfang/k8s), a third-party provider, can be used instead.
40
+
After [installing Sysbox on Kubernetes](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/install-k8s.md), modify your template to use the sysbox-runc RuntimeClass. This requires the Kuberentes Terrafom provider version 2.16.0 or greater.
43
41
44
42
```hcl
43
+
terraform {
44
+
required_providers {
45
+
coder = {
46
+
source = "coder/coder"
47
+
}
48
+
kubernetes = {
49
+
source = "hashicorp/kubernetes"
50
+
version = "2.16.0"
51
+
}
52
+
}
53
+
}
54
+
45
55
resource "coder_agent" "main" {
46
56
os = "linux"
47
57
arch = "amd64"
@@ -56,7 +66,7 @@ resource "coder_agent" "main" {
56
66
EOF
57
67
}
58
68
59
-
resource "k8s_core_v1_pod" "dev" {
69
+
resource "kubernetes_pod" "dev" {
60
70
count = data.coder_workspace.me.start_count
61
71
metadata {
62
72
name = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}"
While less secure, you can attach a [privileged container](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) to your templates. This may come in handy if your nodes cannot run Sysbox.
95
104
96
-
### Use a privileged sidecar container in Docker-based templates:
105
+
### Use a privileged sidecar container in Docker-based templates
Additionally, [Sysbox](https://github.com/nestybox/sysbox) can be used to give workspaces full `systemd` capabilities.
181
202
182
-
### Use systemd in Docker-based templates:
203
+
### Use systemd in Docker-based templates
183
204
184
205
After [installing Sysbox](https://github.com/nestybox/sysbox#installation) on the Coder host, modify your template to use the sysbox-runc runtime and start systemd:
After [installing Sysbox on Kubernetes](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/install-k8s.md), modify your template to use the sysbox-runc RuntimeClass.
243
+
### Use systemd in Kubernetes-based templates
225
244
226
-
> Currently, the official [Kubernetes Terraform Provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest) does not support specifying a custom RuntimeClass. [mingfang/k8s](https://registry.terraform.io/providers/mingfang/k8s), a third-party provider, can be used instead.
245
+
After [installing Sysbox on Kubernetes](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/install-k8s.md),
246
+
modify your template to use the sysbox-runc RuntimeClass. This requires the Kuberentes Terrafom provider version 2.16.0 or greater.
227
247
228
248
```hcl
229
249
terraform {
230
250
required_providers {
231
251
coder = {
232
252
source = "coder/coder"
233
253
}
234
-
k8s = {
235
-
source = "mingfang/k8s"
254
+
kubernetes = {
255
+
source = "hashicorp/kubernetes"
256
+
version = "2.16.0"
236
257
}
237
258
}
238
259
}
239
260
240
-
241
261
resource "coder_agent" "main" {
242
262
os = "linux"
243
263
arch = "amd64"
244
264
dir = "/home/coder"
245
265
}
246
266
247
-
resource "k8s_core_v1_pod" "dev" {
267
+
resource "kubernetes_pod" "dev" {
248
268
count = data.coder_workspace.me.start_count
249
269
metadata {
250
270
name = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}"
0 commit comments