mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 10:31:35 +00:00
kubernetes: Add a simple bridged option for KUBE_NETWORK
This has no kube object(s) but just arranges for the CNI configuration to be written in the right place. The CNI bridge, loopback etc binaries are already included since they are in the reference set. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
ed0e79aa9d
commit
cf01aa4c8d
8
projects/kubernetes/bridge.yml
Normal file
8
projects/kubernetes/bridge.yml
Normal file
@ -0,0 +1,8 @@
|
||||
onboot:
|
||||
- name: bridge
|
||||
image: busybox:latest
|
||||
command: ["/bin/sh", "-c", "set -ex; echo '{\"cniVersion\":\"0.3.1\",\"name\":\"default\",\"plugins\":[{\"type\":\"bridge\",\"bridge\":\"cni0\",\"isDefaultGateway\":true,\"ipMasq\":false,\"hairpinMode\":true,\"ipam\":{\"type\":\"host-local\",\"subnet\":\"10.1.0.0/16\",\"gateway\":\"10.1.0.1\"},\"dns\":{\"nameservers\":[\"10.1.0.1\"]}},{\"type\":\"portmap\",\"capabilities\":{\"portMappings\":true},\"snat\":true}]}' > /var/lib/cni/etc/net.d/10-default.conflist; echo '{\"cniVersion\":\"0.2.0\",\"type\":\"loopback\"}' > /var/lib/cni/etc/net.d/99-loopback.conf"]
|
||||
runtime:
|
||||
mkdir: ["/var/lib/cni/etc/net.d"]
|
||||
binds:
|
||||
- /var/lib:/var/lib
|
Loading…
Reference in New Issue
Block a user