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
Copy file name to clipboardExpand all lines: deploy/addons/gvisor/README.md
+17-13
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
## gVisor Addon
2
-
[gVisor](https://github.com/google/gvisor/blob/master/README.md), a sandboxed container runtime, allows users to securely run pods with untrusted workloads within Minikube.
2
+
[gVisor](https://gvisor.dev/), a sandboxed container runtime, allows users to securely run pods with untrusted workloads within Minikube.
3
3
4
4
### Starting Minikube
5
5
gVisor depends on the containerd runtime to run in Minikube.
@@ -17,21 +17,27 @@ To enable this addon, simply run:
17
17
$ minikube addons enable gvisor
18
18
```
19
19
20
-
Within one minute, the addon manager should pick up the change and you should see the `gvisor` pod:
20
+
Within one minute, the addon manager should pick up the change and you should
21
+
see the `gvisor` pod and `gvisor`[Runtime Class](https://kubernetes.io/docs/concepts/containers/runtime-class/):
21
22
22
23
```
23
-
$ kubectl get pod gvisor -n kube-system
24
-
NAME READY STATUS RESTARTS AGE
25
-
gvisor 1/1 Running 0 3m
24
+
$ kubectl get pod,runtimeclass gvisor -n kube-system
Once the pod has status `Running`, gVisor is enabled in Minikube.
32
+
Once the pod has status `Running`, gVisor is enabled in Minikube.
29
33
30
34
### Running pods in gVisor
31
-
To run a pod in gVisor, add this annotation to the Kubernetes yaml:
35
+
36
+
To run a pod in gVisor, add the `gvisor` runtime class to the Pod spec in your
37
+
Kubernetes yaml:
32
38
33
39
```
34
-
io.kubernetes.cri.untrusted-workload: "true"
40
+
runtimeClassName: gvisor
35
41
```
36
42
37
43
An example Pod is shown below:
@@ -41,17 +47,15 @@ apiVersion: v1
41
47
kind: Pod
42
48
metadata:
43
49
name: nginx-untrusted
44
-
annotations:
45
-
io.kubernetes.cri.untrusted-workload: "true"
46
50
spec:
51
+
runtimeClassName: gvisor
47
52
containers:
48
53
- name: nginx
49
54
image: nginx
50
55
```
51
56
52
-
_Note: this annotation will not be necessary once the RuntimeClass Kubernetes feature is available broadly._
53
-
54
57
### Disabling gVisor
58
+
55
59
To disable gVisor, run:
56
60
57
61
```
@@ -67,4 +71,4 @@ NAME READY STATUS RESTARTS AGE
67
71
gvisor 1/1 Terminating 0 5m
68
72
```
69
73
70
-
_Note: Once gVisor is disabled, any pod with the `io.kubernetes.cri.untrusted-workload` annotation will fail with a FailedCreatePodSandBox error._
74
+
_Note: Once gVisor is disabled, any pod with the `gvisor` Runtime Class or `io.kubernetes.cri.untrusted-workload` annotation will fail with a FailedCreatePodSandBox error._
0 commit comments