diff --git a/board/coreos/minikube/rootfs-overlay/etc/cni/net.d/k8s.conf b/board/coreos/minikube/rootfs-overlay/etc/cni/net.d/k8s.conf new file mode 100644 index 000000000000..7b5404e53bf2 --- /dev/null +++ b/board/coreos/minikube/rootfs-overlay/etc/cni/net.d/k8s.conf @@ -0,0 +1,19 @@ +{ + "name": "rkt.kubernetes.io", + "type": "bridge", + "bridge": "mybridge", + "mtu": 1460, + "addIf": "true", + "isGateway": true, + "ipMasq": true, + "ipam": { + "type": "host-local", + "subnet": "10.1.0.0/16", + "gateway": "10.1.0.1", + "routes": [ + { + "dst": "0.0.0.0/0" + } + ] + } +} diff --git a/configs/minikube_defconfig b/configs/minikube_defconfig index cd1bd0792522..a46064f5530a 100644 --- a/configs/minikube_defconfig +++ b/configs/minikube_defconfig @@ -19,6 +19,7 @@ BR2_PACKAGE_E2FSPROGS=y BR2_PACKAGE_PARTED=y BR2_PACKAGE_CA_CERTIFICATES=y BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_IPROUTE2=y BR2_PACKAGE_IPTABLES=y BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_SOCAT=y diff --git a/package/cni-bin/cni-bin.mk b/package/cni-bin/cni-bin.mk index d592e04aa978..0b0cc556dd75 100644 --- a/package/cni-bin/cni-bin.mk +++ b/package/cni-bin/cni-bin.mk @@ -11,7 +11,27 @@ CNI_BIN_SOURCE = cni-v$(CNI_BIN_VERSION).tgz define CNI_BIN_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 \ $(@D)/bridge \ - $(TARGET_DIR)/bin/bridge + $(TARGET_DIR)/opt/cni/bin/bridge + + ln -sf \ + ../../opt/cni/bin/bridge \ + $(TARGET_DIR)/usr/bin/bridge + + $(INSTALL) -D -m 0755 \ + $(@D)/host-local \ + $(TARGET_DIR)/opt/cni/bin/host-local + + ln -sf \ + ../../opt/cni/bin/host-local \ + $(TARGET_DIR)/usr/bin/host-local + + $(INSTALL) -D -m 0755 \ + $(@D)/loopback \ + $(TARGET_DIR)/opt/cni/bin/loopback + + ln -sf \ + ../../opt/cni/bin/loopback \ + $(TARGET_DIR)/usr/bin/loopback endef $(eval $(generic-package))