• Angus Lees's avatar
    kubeadm: chroot to new --rootfs arg · 16e46c8a
    Angus Lees authored
    This change adds a new --rootfs=path option to kubeadm, and (if
    provided) chroot()s to this path before performing file operations.
    
    This makes it possible to run the kubeadm binary from a container, but
    perform remaining file operations against the host filesystem using
    something like:
    
        docker run -v /:/rootfs --net=host --uts=host --pid=host \
           kubeadm:latest init --rootfs /rootfs...
    
    Fixes kubernetes/kubeadm#503
    16e46c8a
chroot_test.go 1.78 KB