You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a quick proof of concept, using vment-helper to connect vfkit to
vment network shared mode instead of the "nat" network.
We should add network options for vfkit and use vmnet-helper only when
using the vmnet network, but this is good enough to play with
vmnet-helper and run stress tests.
We also need documentation, but for now here is how to play with
vmnet-helper:
1. Install latest release:
https://github.com/nirs/vmnet-helper?tab=readme-ov-file#installation
2. Setup vment-helper sudoers rule:
https://github.com/nirs/vmnet-helper?tab=readme-ov-file#granting-permission-to-run-vmnet-helper
At this point you can start clusters with vfkit driver:
% out/minikube start --driver vfkit --container-runtime containerd
😄 minikube v1.35.0 on Darwin 15.3.1 (arm64)
✨ Using the vfkit (experimental) driver based on user configuration
👍 Starting "minikube" primary control-plane node in "minikube" cluster
🔥 Creating vfkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
📦 Preparing Kubernetes v1.32.2 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 "minikube" cluster and "default" namespace by default
The cluster IP will be in the vment shared network:
% out/minikube profile list
|----------|-----------|------------|---------------|------|---------|--------|-------|----------------|--------------------|
| Profile | VM Driver | Runtime | IP | Port | Version | Status | Nodes | Active Profile | Active Kubecontext |
|----------|-----------|------------|---------------|------|---------|--------|-------|----------------|--------------------|
| minikube | vfkit | containerd | 192.168.105.8 | 8443 | v1.32.2 | OK | 1 | * | * |
|----------|-----------|------------|---------------|------|---------|--------|-------|----------------|--------------------|
We use the same --interface-id (generated from the machine name) when
starting the vmnet interface, so we will always get the same MAC address
(assigned by the vmnet framework) and the same IP address (assigned by
the DHCP server).
The vmnet-helper process is started in the background with vfkit, and
must remain running while vfkit is running. Like vfkit, we start it in
the background, in a new process group, so it not terminated if the
minikube process group is terminate.
Since vment-helper requires root to start the vmnet interface, we start
it with sudo, creating 2 child processes. vment-helper drops privileges
immediately after starting the vment interface, and run as the user and
group running minikube.
Stopping the cluster will stop sudo, which will stop the vmnet-helper
process. Deleting the cluster kill both sudo and vment-helper by killing
the process group.
0 commit comments