minikube/site
Nir Soffer b66888d972
vfkit: Use EFI booloader (#20833)
* vfkit: Log serial console to file

To make debugging easier, add virtio-serial device logging serial
console to file:

    ~/.minikube/machines/NAME/serial.log

To enable logging, we need to enable the console in the kernel command
line, since we still use direct kernel boot.

Example log:

    % cat /Users/nir/.minikube/machines/vfkit/vfkig.log
    [    0.896094] cacheinfo: Unable to detect cache hierarchy for CPU 0
    [    0.897186] loop: module loaded
    [    0.897670] virtio_blk virtio2: [vda] 840488 512-byte logical blocks (430 MB/410 MiB)
    [    0.897733] vda: detected capacity change from 0 to 430329856
    [    0.898460] virtio_blk virtio3: [vdb] 40960000 512-byte logical blocks (21.0 GB/19.5 GiB)
    [    0.898533] vdb: detected capacity change from 0 to 20971520000
    ...
    [    1.794714] systemd[1]: Detected virtualization vm-other.
    [    1.794752] systemd[1]: Detected architecture arm64.

    Welcome to Buildroot 2025.02!

    [    1.794944] systemd[1]: Hostname set to <minikube>.
    [    1.795011] systemd[1]: Initializing machine ID from random generator.
    ...
    [  OK  ] Started Container Runtime Interface for OCI (CRI-O).
    [  OK  ] Reached target Multi-User System.

    Welcome to minikube
    vfkit login: [    6.681578] systemd-ssh-generator[630]: Binding SSH to AF_UNIX socket /run/ssh-unix-local/socket.

* vfkit: Use EFI bootloader

With the fixed iso, we can simplify the driver using the EFI bootloader
option[1] instead of the legacy and deprecated --kernel, --kernel-cmdline,
and --initrd options[2].

Example run:

    % minikube start -p vfkit --driver vfkit --container-runtime containerd --network vmnet-shared
    😄  [vfkit] minikube v1.36.0 on Darwin 15.5 (arm64)
      Using the vfkit driver based on user configuration
    👍  Starting "vfkit" primary control-plane node in "vfkit" cluster
    🔥  Creating vfkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
    📦  Preparing Kubernetes v1.33.1 on containerd 1.7.23 ...
        ▪ Generating certificates and keys ...
        ▪ Booting up control plane ...
        ▪ Configuring RBAC rules ...
    🔗  Configuring bridge CNI (Container Networking Interface) ...
    🔎  Verifying Kubernetes components...
        ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
    🌟  Enabled addons: default-storageclass, storage-provisioner
    🏄  Done! kubectl is now configured to use "vfkit" cluster and "default" namespace by default

Comparing direct kernel boot and --bootloader efi shows that it is little bit faster and boot time is more consistent.

    % hyperfine -r 10 -C "minikube delete" \
        "vfkit-efi/out/minikube start --driver vfkit --network vmnet-shared --container-runtime containerd --no-kubernetes" \
        "vfkit-direct/out/minikube start --driver vfkit --network vmnet-shared --container-runtime containerd --no-kubernetes"
    Benchmark 1: vfkit-efi/out/minikube start --driver vfkit --network vmnet-shared --container-runtime containerd --no-kubernetes
      Time (mean ± σ):     10.205 s ±  0.656 s    [User: 0.381 s, System: 0.266 s]
      Range (min … max):    9.106 s … 11.254 s    10 runs

    Benchmark 2: vfkit-direct/out/minikube start --driver vfkit --network vmnet-shared --container-runtime containerd --no-kubernetes
      Time (mean ± σ):     10.933 s ±  1.616 s    [User: 0.402 s, System: 0.406 s]
      Range (min … max):    9.155 s … 14.168 s    10 runs

    Summary
      vfkit-efi/out/minikube start --driver vfkit --network vmnet-shared --container-runtime containerd --no-kubernetes ran
        1.07 ± 0.17 times faster than vfkit-direct/out/minikube start --driver vfkit --network vmnet-shared --container-runtime containerd --no-kubernetes

[1] https://github.com/crc-org/vfkit/blob/main/doc/usage.md#efi-bootloader
[2] https://github.com/crc-org/vfkit/blob/main/doc/usage.md#deprecated-options

* docs: Update vfkit driver documentation

- Separate vfkit requirements and vmnet-shared requirements
- Update minimal macOS version required for --bootloader efi
- Simplify vfkit upgrade, it is available in brew now
2025-06-10 10:21:10 -07:00
..
assets reduce padding in sidebar tree 2022-11-01 17:45:21 -04:00
content/en vfkit: Use EFI booloader (#20833) 2025-06-10 10:21:10 -07:00
layouts Revamp minikube website footer 2024-07-12 20:29:29 +05:30
static add time-to-k8s benchmark for v1.36.0 (#20825) 2025-05-23 10:19:44 -07:00
themes site: Update docsy version to v0.12.0 (#20875) 2025-06-02 14:23:04 -07:00
.gitignore Fix unit tests and go tempalte block 2020-01-08 17:08:11 -08:00
.hugo_build.lock docs: add details about app output for /docs/start 2021-10-25 19:13:48 +05:30
README.md Fix typos 2022-06-10 15:26:35 -07:00
config.toml fix: fix slack link on minikube website 2025-01-22 19:02:00 +00:00
package-lock.json change versions 2023-09-05 14:15:58 -07:00
package.json change versions 2023-09-05 14:15:58 -07:00

README.md

Docsy is a Hugo theme for technical documentation sites, providing easy site navigation, structure, and more. This Minikube project uses the Docsy theme for Minikube Website.

You can find detailed theme instructions in the Docsy user guide: https://docsydocs.netlify.com/docs/

Running the website locally

Clone the minikube project fork with option --recurse-submodules --depth 1 to download and update submodule dependencies.

git clone --recurse-submodules --depth 1 https://github.com/kubernetes/minikube.git  # replace path with your github fork of minikube 
cd minikube/site
hugo server # to server site locally

The theme is included as a Git submodule:

▶ git submodule
 2536303cad19991c673037f4f16332075141364a themes/docsy (2536303)

If you want to do SCSS edits and want to publish these, you need to install PostCSS (not needed for hugo server):

npm install

Common Issues

Start building sites …
hugo v0.86.0+extended darwin/amd64 BuildDate=unknown
Error: Error building site: "/minikube/site/content/en/docs/contrib/releasing/binaries.md:64:1": failed to extract shortcode: template for shortcode "alert" not found
Built in 667 ms

This indicates the submodules are not updated. Please run the following command to fix.
git submodule update --init --recursive