@@ -17,14 +17,15 @@ with gVisor enabled. You can view the full documentation
17
17
### GKE Autopilot cluster
18
18
19
19
Alternatively to GKE standard cluster, you could run docker in gVisor at GKE
20
- autopilot cluster, the version needs to be 1.32 or higher. When creating the
21
- autopilot cluster, please add the option ` --workload-policies=allow-net-admin `
22
- to allow NET_ADMIN capability that will be granted by the gVisor sandbox.
20
+ autopilot cluster, the version needs to be 1.33.2-gke.4655000 or higher. When
21
+ creating the autopilot cluster, please add the option
22
+ ` --workload-policies=allow-net-admin ` to allow NET_ADMIN capability that will be
23
+ granted by the gVisor sandbox.
23
24
24
25
An example command to start an GKE autopilot cluster will be:
25
26
26
27
``` sh
27
- gcloud container clusters create-auto [CLUTER_NAME] --workload-policies=allow-net-admin --location=[LOCATION] --cluster-version=1.32 .2-gke.1182001
28
+ gcloud container clusters create-auto [CLUTER_NAME] --workload-policies=allow-net-admin --location=[LOCATION] --cluster-version=1.33 .2-gke.4655000
28
29
```
29
30
30
31
### Get started
@@ -45,17 +46,12 @@ metadata:
45
46
name : docker-in-gvisor
46
47
spec :
47
48
runtimeClassName : gvisor
48
- # DNS config is only needed for GKE Autopilot
49
- dnsPolicy : " None"
50
- dnsConfig :
51
- nameservers :
52
- - " 1.1.1.1"
53
- - " 8.8.8.8"
54
49
containers :
55
50
- name : docker-in-gvisor
56
51
image : {registry_url}/docker-in-gvisor:latest
57
52
securityContext :
58
53
capabilities :
54
+ # NET_ADMIN and SYS_ADMIN are required.
59
55
add : [AUDIT_WRITE,CHOWN,DAC_OVERRIDE,FOWNER,FSETID,KILL,MKNOD,NET_BIND_SERVICE,NET_RAW,SETFCAP,SETGID,SETPCAP,SETUID,SYS_CHROOT,SYS_PTRACE,NET_ADMIN,SYS_ADMIN]
60
56
volumeMounts :
61
57
- name : docker
@@ -81,40 +77,6 @@ $ kubectl apply -f docker.yaml
81
77
Verify that the docker-in-gvisor pid is running successfully: `shell $ kubectl
82
78
get pods | grep docker-in-gvisor`
83
79
84
- #### DNS config
85
-
86
- ##### GKE standard cluster
87
-
88
- The ` dnsConfig ` in the yaml file is not needed for GKE standard clusters.
89
-
90
- ##### GKE Autopilot
91
-
92
- You have 3 options to deal with DNS config in the cluster:
93
-
94
- * Public DNS
95
-
96
- If public DNS works for you, you will be able to leverage public DNS like
97
- ` 1.1.1.1 ` or ` 8.8.8.8 ` like we listed above;
98
-
99
- * kube-dns
100
-
101
- Otherwise, ` kube-dns ` will be a helpful option. The ` kube-dns ` is a pod which
102
- deployed with your k8s cluster.
103
-
104
- You will look for kube-dns's address you can specify in the ` dnsConfig `
105
-
106
- ```
107
- $ kubectl get services kube-dns -n kube-system
108
- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
109
- kube-dns ClusterIP 34.118.224.10 <none> 53/UDP,53/TCP 3d1h
110
- ```
111
-
112
- * Host network driver
113
-
114
- If you are OK with using Docker host network driver, you can ignore DNS config
115
- in the yaml file. For every command you execute in docker in gVisor, you have to
116
- specify host network driver as ` --network=host ` .
117
-
118
80
### Build and run the image with docker in gVisor
119
81
120
82
You can access the container by executing a shell inside it. Use the following
0 commit comments