mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-25 03:34:58 +00:00
kubernetes: Enable net.ipv4.ip_forward
This doesn't seem to be necessary when using Docker Engine as the CRI backend, but in general it is. The sysctl container must be writeable to allow the /etc/sysctl.d/01-kubernetes.conf mount point to be created. See #2503. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
825e43f7c4
commit
1e15243b11
@ -9,6 +9,9 @@ init:
|
|||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
image: linuxkit/sysctl:154913b72c6f1f33eb408609fca9963628e8c051
|
image: linuxkit/sysctl:154913b72c6f1f33eb408609fca9963628e8c051
|
||||||
|
binds:
|
||||||
|
- /etc/sysctl.d/01-kubernetes.conf:/etc/sysctl.d/01-kubernetes.conf
|
||||||
|
readonly: false
|
||||||
- name: sysfs
|
- name: sysfs
|
||||||
image: linuxkit/sysfs:3ae01a25583ee37a5ff8b09a0e569cb4bd8cf2e9
|
image: linuxkit/sysfs:3ae01a25583ee37a5ff8b09a0e569cb4bd8cf2e9
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
@ -60,6 +63,8 @@ services:
|
|||||||
- name: kubelet
|
- name: kubelet
|
||||||
image: linuxkitprojects/kubernetes:c4a6ae5121df50471ad244b9fc153ff5eb674fb2
|
image: linuxkitprojects/kubernetes:c4a6ae5121df50471ad244b9fc153ff5eb674fb2
|
||||||
files:
|
files:
|
||||||
|
- path: /etc/sysctl.d/01-kubernetes.conf
|
||||||
|
contents: 'net.ipv4.ip_forward = 1'
|
||||||
- path: /opt/cni
|
- path: /opt/cni
|
||||||
directory: true
|
directory: true
|
||||||
- path: /etc/cni
|
- path: /etc/cni
|
||||||
|
@ -9,6 +9,9 @@ init:
|
|||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
image: linuxkit/sysctl:154913b72c6f1f33eb408609fca9963628e8c051
|
image: linuxkit/sysctl:154913b72c6f1f33eb408609fca9963628e8c051
|
||||||
|
binds:
|
||||||
|
- /etc/sysctl.d/01-kubernetes.conf:/etc/sysctl.d/01-kubernetes.conf
|
||||||
|
readonly: false
|
||||||
- name: sysfs
|
- name: sysfs
|
||||||
image: linuxkit/sysfs:3ae01a25583ee37a5ff8b09a0e569cb4bd8cf2e9
|
image: linuxkit/sysfs:3ae01a25583ee37a5ff8b09a0e569cb4bd8cf2e9
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
@ -58,6 +61,8 @@ services:
|
|||||||
- name: kubelet
|
- name: kubelet
|
||||||
image: linuxkitprojects/kubernetes:c4a6ae5121df50471ad244b9fc153ff5eb674fb2
|
image: linuxkitprojects/kubernetes:c4a6ae5121df50471ad244b9fc153ff5eb674fb2
|
||||||
files:
|
files:
|
||||||
|
- path: /etc/sysctl.d/01-kubernetes.conf
|
||||||
|
contents: 'net.ipv4.ip_forward = 1'
|
||||||
- path: /opt/cni
|
- path: /opt/cni
|
||||||
directory: true
|
directory: true
|
||||||
- path: /etc/cni
|
- path: /etc/cni
|
||||||
|
Loading…
Reference in New Issue
Block a user