### Example JSON Output from minikube Start Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/contrib/json_output.en.md This is an example of the JSON output generated by `minikube start --output json`, showing Cloud Events compatible step-by-step progress. ```json {"data":{"currentstep":"0","message":"minikube v1.12.1 on Darwin 10.14.6\n","name":"Initial Minikube Setup","totalsteps":"10"},"datacontenttype":"application/json","id":"68ff70ae-202b-4b13-8351-e9f060e8c56e","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"1","message":"Automatically selected the hyperkit driver\n","name":"Selecting Driver","totalsteps":"10"},"datacontenttype":"application/json","id":"39bed8e9-3c1a-444e-997c-2ec19bdb1ca1","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"3","message":"Starting control plane node minikube in cluster minikube\n","name":"Starting Node","totalsteps":"10"},"datacontenttype":"application/json","id":"7c80bc53-3ac4-4a42-a493-92e269cc56c9","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"6","message":"Creating hyperkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...\n","name":"Creating VM","totalsteps":"10"},"datacontenttype":"application/json","id":"7f5f23a4-9a09-4954-8abc-d29bda2cc569","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} ``` -------------------------------- ### Start Minikube with krunkit driver Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/krunkit.md Starts a Minikube cluster using the krunkit driver. Ensure vmnet-helper is installed and configured. ```shell minikube start --driver krunkit ``` -------------------------------- ### Install Go9p and UFS Source: https://github.com/kubernetes/minikube/blob/master/third_party/go9p/README.md Set the GOPATH, fetch, and install the go9p and go9p/ufs packages. Execute the installed ufs binary. ```bash export GOPATH=~rminnich/go go get -a /k8s.io/minikube/third_party/go9p go get -a /k8s.io/minikube/third_party/go9p/ufs go install -a /k8s.io/minikube/third_party/go9p/ufs ~/go/bin/ufs ``` -------------------------------- ### Install vmnet-helper Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/ai-playground.md Installs vmnet-helper by downloading and executing an installation script, then verifies the installation. ```shell curl -fsSL https://github.com/minikube-machine/vmnet-helper/releases/latest/download/install.sh | bash /opt/vmnet-helper/bin/vmnet-helper --version ``` -------------------------------- ### Start Minikube Source: https://github.com/kubernetes/minikube/blob/master/deploy/addons/registry-aliases/README.md Starts a Minikube instance with the 'demo' profile. This is a prerequisite for enabling addons. ```shell minikube start -p demo ``` -------------------------------- ### Start Minikube in GitHub Actions Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/setup_minikube_in_github_actions.md Use this action to install and start a minikube cluster as a step in your GitHub Actions workflow. Ensure you are using the latest version for the most up-to-date features and fixes. ```yaml steps: - name: start minikube id: minikube uses: medyagh/setup-minikube@latest ``` -------------------------------- ### Start Minikube with QEMU Driver Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/qemu.md Use this command to start a Minikube instance using the QEMU driver. ```shell minikube start --driver=qemu ``` -------------------------------- ### Pseudocode for Docker Image Build Benchmark Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/benchmarks/imageBuild/benchmarkingprocess.md This pseudocode outlines the steps for benchmarking Docker image loads, including setup, initial and iterative simulations, timing, verification, and cleanup. It covers starting minikube, building Go binaries, loading images, and clearing Docker cache. ```pseudocode // Pseudo code of running docker-env benchmark startMinikube() // minikube start --container-runtime=docker for image in [fewLargeLayers, fewSmallLayers, ...] { buildGoBinary() // initial simulation for i in runCount { startTimer() runDockerEnvImageLoad(image) stopTimer() verifyImageSuccessfullyLoaded() storeTimeTaken() removeImage() clearDockerCache() } // iterative simulation for i in runCount { updateGoBinary() startTimer() runDockerEnvImageLoad(image) stopTimer() verifyImageSuccessfullyLoaded() storeTimeTaken() // skip if first run } clearDockerCache() calculateAndRecordAverageTime() } deleteMinikube() // minkube delete --all ``` -------------------------------- ### Start Minikube with sufficient resources Source: https://github.com/kubernetes/minikube/blob/master/deploy/addons/istio/README.md Ensure Minikube is started with at least 8192 MB of memory and 4 CPUs before enabling Istio. Refer to Istio's platform setup documentation for more details. ```shell minikube start --memory=8192mb --cpus=4 ``` -------------------------------- ### Start Minikube with Docker Driver Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/docker.md Use this command to start a Kubernetes cluster using the Docker driver. Ensure Docker is installed and configured. ```shell minikube start --driver=docker ``` -------------------------------- ### Add Custom resolv.conf to Minikube Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/filesync.md This example demonstrates how to add a custom DNS configuration file to minikube. Files placed in `$MINIKUBE_HOME/files` will be synced into the VM when `minikube start` is executed. ```shell mkdir -p ~/.minikube/files/etc echo nameserver 8.8.8.8 > ~/.minikube/files/etc/resolv.conf minikube start ``` -------------------------------- ### Start Minikube with None Driver Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/nvidia.md Start minikube using the 'none' driver. This configuration requires manual setup of NVIDIA drivers and Docker. ```shell minikube start --driver=none --apiserver-ips 127.0.0.1 --apiserver-name localhost ``` -------------------------------- ### Install socket_vmnet from Source Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/qemu.md Installs the socket_vmnet component from its source repository using Go. This method is an alternative to using Homebrew and requires Go to be installed. ```shell git clone https://github.com/lima-vm/socket_vmnet.git && cd socket_vmnet sudo make install ``` -------------------------------- ### Configure and Start Minikube for KubeVirt Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/addons/kubevirt.md Configure minikube with specific settings for KubeVirt and then start the cluster. This sets memory and the VM driver before starting. ```shell minikube config -p kubevirt set memory 4096 minikube config -p kubevirt set vm-driver kvm2 minikube start -p kubevirt ``` -------------------------------- ### Install build dependencies Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/contrib/building/iso.md Install the necessary tools and libraries required for building the minikube ISO without using Docker. Ensure you have a compatible Go distribution installed separately. ```shell sudo apt-get install \ automake \ bc \ build-essential \ cpio \ gcc-multilib \ genisoimage \ git \ gnupg2 \ libtool \ locales \ p7zip-full \ python2 \ unzip \ wget \ ``` -------------------------------- ### Apply Ingress Example Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/start/_index.md Apply the Ingress example configuration to your cluster using kubectl. This command fetches the YAML from a URL and applies it. ```shell kubectl apply -f https://storage.googleapis.com/minikube-site-examples/ingress-example.yaml ``` -------------------------------- ### Manually start a libvirt network Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/kvm2.md Use this command to manually start or activate a libvirt network. Replace `` with the name of the network you wish to start. ```shell sudo virsh net-start ``` -------------------------------- ### Start Minikube with Containerd Runtime Source: https://github.com/kubernetes/minikube/blob/master/deploy/addons/gvisor/README.md Specify these flags when starting minikube to use the containerd runtime, which is required for gVisor. ```shell $ minikube start --container-runtime=containerd \ --docker-opt containerd=/var/run/containerd/containerd.sock ``` -------------------------------- ### Install krunkit using Homebrew Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/krunkit.md Installs krunkit and trusts the libkrun/krun tap. Ensure you remove any old taps first if upgrading. ```shell brew tap libkrun/krun brew trust libkrun/krun # trust the tap only required if using Homebrew 6.0 or later brew install krunkit ``` -------------------------------- ### Start Minikube as a Docker Desktop Replacement Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/faq/_index.md Run Minikube with Docker as the container runtime and without starting Kubernetes for a Docker Desktop replacement. ```bash minikube start --container-runtime=docker --no-kubernetes ``` -------------------------------- ### Start Minikube with Increased Memory Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt If you encounter resource limitations, consider starting your Minikube cluster with a larger memory allocation. ```bash minikube start --memory SIZE_MB ``` -------------------------------- ### Show Last Start Logs Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Displays only the log entries from the last time Minikube was started. This is helpful for diagnosing startup issues. ```bash minikube logs --last-start ``` -------------------------------- ### Delete and Start Minikube Cluster Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Instructions to delete an existing Minikube cluster and start a new one with a specified driver. ```bash - Delete and recreate minikube cluster minikube delete minikube start --driver={{.driver_name}} ``` -------------------------------- ### Example of Setting Registry Step and Outputting Step in Go Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/contrib/json_output.en.md This Go code demonstrates how to set the registry step to `register.PreparingKubernetes` and then output a formatted step message using `out.Step`. ```go register.Reg.SetStep(register.PreparingKubernetes) out.Step(cr.Style(), "Preparing Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}} ...", out.V{"k8sVersion": k8sVersion, "runtime": cr.Name(), "runtimeVersion": version}) ``` -------------------------------- ### Delete or Start Existing Minikube Cluster Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Provides commands to either delete an existing cluster or start it with a specified driver. ```bash {{.delcommand}} ``` ```bash {{.command}} --driver={{.old}} ``` -------------------------------- ### Minikube Start with Specific Kubernetes Version Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Instructions for managing Minikube clusters with specific Kubernetes versions, including recreating, creating a second cluster, or using an existing one. ```bash 1) Recreate the cluster with Kubernetes {{.new}}, by running: minikube delete{{.profile}} minikube start{{.profile}} --kubernetes-version={{.prefix}}{{.new}} 2) Create a second cluster with Kubernetes {{.new}}, by running: minikube start -p {{.suggestedName}} --kubernetes-version={{.prefix}}{{.new}} 3) Use the existing cluster at version Kubernetes {{.old}}, by running: minikube start{{.profile}} --kubernetes-version={{.prefix}}{{.old}} ``` -------------------------------- ### Start Minikube with Specific Disk Size Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Starts a minikube cluster with a specified disk size in megabytes. Use this command when you require more disk space for your cluster. ```bash minikube start --disk SIZE_MB ``` -------------------------------- ### Start Minikube Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/custom_cert_ingress.md Initiates the minikube environment. This is the first step before configuring any addons. ```bash $ minikube start ``` -------------------------------- ### Start Minikube with Hyper-V Virtual Switch Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt When using the Hyper-V driver, configure an external network switch and specify its name using this flag. ```bash minikube start --hyperv-virtual-switch= ``` -------------------------------- ### Install socket_vmnet via Homebrew Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/qemu.md Installs the socket_vmnet component using Homebrew and starts its services. This is a prerequisite for using the `socket_vmnet` network option with the QEMU driver on macOS. ```shell brew install socket_vmnet HOMEBREW=$(which brew) && sudo ${HOMEBREW} services start socket_vmnet ``` -------------------------------- ### Prepare and Start Minikube with Token Auth File Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/token-auth-file.md This sequence of commands prepares the necessary directory, copies the token file, and starts Minikube with the token authentication file configured. Ensure this is done before creating the Minikube cluster. ```shell # Create the folder that will be copied into the control plane. mkdir -p ~/.minikube/files/etc/ca-certificates/ # Copy the token file into the folder. cp token.csv ~/.minikube/files/etc/ca-certificates/token.csv # Start minikube with the token auth file specified. minikube start \ --extra-config=apiserver.token-auth-file=/etc/ca-certificates/token.csv ``` -------------------------------- ### Install Conntrack for Kubernetes Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Installs the 'conntrack' tool, which is a dependency for certain Kubernetes versions. This command is run if conntrack is not found in the root path. ```bash conntrack ``` -------------------------------- ### Install Crictl for Kubernetes Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Installs the 'crictl' tool, which is a dependency for certain Kubernetes versions. This command is run if crictl is not found in the root path. ```bash crictl ``` -------------------------------- ### Registry Service Details Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/addons/registry-aliases.md Example output of 'kubectl get svc -n kube-system', showing the CLUSTER-IP for the registry service. ```text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kube-dns ClusterIP 10.96.0.10 53/UDP,53/TCP,9153/TCP 17m registry ClusterIP 10.97.247.75 80/TCP 94s ``` -------------------------------- ### Enable multiple minikube addons at startup Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/deploying.md Specify multiple addons to be enabled when minikube starts. ```shell minikube start --addons --addons ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/contrib/documentation.en.md Run this command to serve the minikube documentation pages locally. Ensure you have the correct Go version installed. Note that Windows users may encounter issues with Hugo. ```shell make site ``` -------------------------------- ### Validate Start with Custom Certificates Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/contrib/tests.en.md Verifies that `minikube start` respects the `HTTPS_PROXY` environment variable and functions correctly with custom certificates. This test involves setting up a proxy using `mitmdump` and installing its generated certificates. Primarily runs on GitHub Actions for amd64 Linux. ```bash HTTPS_PROXY=http://localhost:8080 minikube start ``` -------------------------------- ### Install Minikube and Kubectl for CI Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/continuous_integration.md This script downloads and installs the latest stable Minikube and kubectl binaries. It configures Minikube to disable update notifications and starts it using the Docker driver. This is useful for CI environments where you need to ensure specific versions are available and configured. ```shell curl -LO \ https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ && install minikube-linux-amd64 /tmp/ kv=$(curl -sSL https://dl.k8s.io/release/stable.txt) curl -LO \ https://dl.k8s.io/$kv/bin/linux/amd64/kubectl \ && install kubectl /tmp/ /tmp/minikube-linux-amd64 config set WantUpdateNotification false /tmp/minikube-linux-amd64 start --driver=docker ``` -------------------------------- ### Create HA Multi-Control Plane Cluster Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt To create a highly available cluster, start with a minimum of three control-plane nodes. ```bash minikube start --ha ``` -------------------------------- ### Generate Shell Completion for Minikube Source: https://github.com/kubernetes/minikube/blob/master/translations/strings.txt Outputs minikube shell completion for bash, zsh, fish, or powershell. This depends on the bash-completion binary. Ensure you have the necessary dependencies installed for your OS. ```bash minikube completion bash > ~/.minikube-completion minikube completion zsh > ~/.minikube-completion source ~/.minikube-completion minikube completion fish > ~/.config/fish/completions/minikube.fish ``` ```powershell minikube completion powershell > $HOME\.minikube-completion.ps1 Add-Content $PROFILE '. $HOME\.minikube-completion.ps1' Add-Content $PROFILE 'if (Get-Command minikube -ErrorAction SilentlyContinue) { minikube completion powershell | Out-String | Invoke-Expression }' ``` -------------------------------- ### Get last start logs Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/commands/logs.md Retrieves only the logs generated during the last startup of the minikube instance. This can help diagnose issues related to cluster initialization. ```shell minikube logs --last-start-only ``` -------------------------------- ### Initialize and Start Podman Machine Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/podman.md On non-Linux systems, you need to initialize and start the Podman virtual machine. This includes setting resource limits and establishing a default connection. ```shell podman machine init --cpus 2 --memory 2048 --disk-size 20 ``` ```shell podman machine start ``` ```shell podman system connection default podman-machine-default-root ``` ```shell podman info ``` -------------------------------- ### Kube-system Pods Status Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/addons/registry-aliases.md Example output of 'watch kubectl get pods -n kube-system', showing the status of pods in the kube-system namespace, including the registry. ```text NAME READY STATUS RESTARTS AGE coredns-6955765f44-kpbzt 1/1 Running 0 16m coredns-6955765f44-lzlsv 1/1 Running 0 16m etcd-demo 1/1 Running 0 16m kube-apiserver-demo 1/1 Running 0 16m kube-controller-manager-demo 1/1 Running 0 16m kube-proxy-q8rb9 1/1 Running 0 16m kube-scheduler-demo 1/1 Running 0 16m *registry-4k8zs* 1/1 Running 0 40s registry-proxy-vs8jt 1/1 Running 0 40s storage-provisioner 1/1 Running 0 16m ``` -------------------------------- ### Deploy and Expose a Service Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/start/_index.md Create a sample deployment named 'hello-minikube' and expose it using a NodePort service on port 8080. This is a common way to make applications accessible within the cluster. ```shell kubectl create deployment hello-minikube --image=kicbase/echo-server:1.0 kubectl expose deployment hello-minikube --type=NodePort --port=8080 ``` -------------------------------- ### Start minikube using a source-built binary Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/contrib/building/binaries.md Execute the minikube cluster using the binary compiled from source, located in the ./out/ directory. ```shell ./out/minikube start ``` -------------------------------- ### Start Minikube with Docker Runtime Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/docker_desktop_replacement.md Start minikube using the 'docker' container runtime and enabling a VM. This is a prerequisite for using minikube as a Docker Desktop replacement. ```shell minikube start --container-runtime=docker --vm=true ``` -------------------------------- ### Start HA Minikube Cluster Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/multi_control_plane_ha_clusters.md Initiate a Minikube HA cluster using the specified driver and container runtime. This command creates a multi-control plane setup with a dedicated profile. ```shell minikube start --ha --driver=docker --container-runtime=containerd --profile ha-demo ``` ```text 😄 [ha-demo] minikube v1.32.0 on Opensuse-Tumbleweed 20240311 ✨ Using the docker driver based on user configuration 📌 Using Docker driver with root privileges 👍 Starting "ha-demo" primary control-plane node in "ha-demo" cluster 🚜 Pulling base image v0.0.42-1710284843-18375 ... 🔥 Creating docker container (CPUs=2, Memory=5266MB) ... 📦 Preparing Kubernetes v1.28.4 on containerd 1.6.28 ... ▪ Generating certificates and keys ... ▪ Booting up control plane ... ▪ Configuring RBAC rules ... 🔗 Configuring CNI (Container Networking Interface) ... ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5 🌟 Enabled addons: storage-provisioner, default-storageclass 👍 Starting "ha-demo-m02" control-plane node in "ha-demo" cluster 🚜 Pulling base image v0.0.42-1710284843-18375 ... 🔥 Creating docker container (CPUs=2, Memory=5266MB) ... 🌐 Found network options: ▪ NO_PROXY=192.168.49.2 📦 Preparing Kubernetes v1.28.4 on containerd 1.6.28 ... ▪ env NO_PROXY=192.168.49.2 🔎 Verifying Kubernetes components... 👍 Starting "ha-demo-m03" control-plane node in "ha-demo" cluster 🚜 Pulling base image v0.0.42-1710284843-18375 ... 🔥 Creating docker container (CPUs=2, Memory=5266MB) ... 🌐 Found network options: ▪ NO_PROXY=192.168.49.2,192.168.49.3 📦 Preparing Kubernetes v1.28.4 on containerd 1.6.28 ... ▪ env NO_PROXY=192.168.49.2 ▪ env NO_PROXY=192.168.49.2,192.168.49.3 🔎 Verifying Kubernetes components... 🏄 Done! kubectl is now configured to use "ha-demo" cluster and "default" namespace by default ``` -------------------------------- ### Service Details with External IP Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/accessing.md Example output of `kubectl get svc` showing a LoadBalancer service with its assigned external IP. This IP is accessible from the host when `minikube tunnel` is active. ```text $ kc get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-minikube1 LoadBalancer 10.96.184.178 10.96.184.178 8080:30791/TCP 40s ``` -------------------------------- ### Start minikube with a local ISO Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/contrib/building/iso.md Start a minikube cluster using a locally built ISO image. This command points minikube to the generated ISO file in the 'out' directory. ```shell $ ./out/minikube start --iso-url=file://$(pwd)/out/minikube-.iso ``` -------------------------------- ### Nslookup Example Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/addons/ingress-dns.md Demonstrates how to use `nslookup` to query a local service DNS name, showing that it resolves to the Minikube IP address when the ingress-dns addon is active. ```text #bash:~$ nslookup myservice.test $(minikube ip) Server: 192.168.99.169 Address: 192.168.99.169#53 Non-authoritative answer: Name: myservice.test $(minikube ip) Address: 192.168.99.169 ``` -------------------------------- ### Manually set a libvirt network to autostart Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/kvm2.md Execute this command to ensure a specific libvirt network automatically starts on system boot. Replace `` with the actual network name. ```shell sudo virsh net-autostart ``` -------------------------------- ### Install krunkit Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/ai-playground.md Installs the latest version of krunkit using Homebrew and verifies the installation. ```shell brew tap slp/krunkit brew install krunkit krunkit --version ``` -------------------------------- ### Install vmnet-helper Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/drivers/vfkit.md Installs the vmnet-helper utility, which is required for the vmnet-shared networking option. This script downloads the latest release and installs it to /opt/vmnet-helper. ```shell curl -fsSL https://github.com/minikube-machine/vmnet-helper/releases/latest/download/install.sh | bash ``` -------------------------------- ### Expose Deployment using Minikube Kubectl Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/kubectl.md Example command to expose the 'hello-minikube' deployment as a NodePort service, specifying the port for external access. ```shell minikube kubectl -- expose deployment hello-minikube --type=NodePort --port=8080 ``` -------------------------------- ### Install Minikube using Chocolatey Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/start/_index.md Installs minikube using the `choco` command-line tool. Ensure the Chocolatey Package Manager is installed. ```shell choco install minikube ``` -------------------------------- ### Full GitHub Actions Workflow with Minikube Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/setup_minikube_in_github_actions.md This example workflow demonstrates building a Docker image and deploying it to a minikube cluster within GitHub Actions. It includes checking out code, setting up minikube, building the image using minikube's Docker environment, applying Kubernetes manifests, and testing the deployed service. ```yaml name: CI on: - pull_request jobs: job1: runs-on: ubuntu-latest name: build example and deploy to minikube steps: - uses: actions/checkout@v4 with: repository: medyagh/local-dev-example-with-minikube - name: Start minikube uses: medyagh/setup-minikube@latest - name: Try the cluster! run: kubectl get pods -A - name: Build image run: | minikube image build -t local/devex:v1 . - name: Deploy to minikube run: kubectl apply -f deploy/k8s.yaml kubectl wait --for=condition=ready pod -l app=local-devex - name: Test service URLs run: | minikube service list minikube service local-devex-svc --url echo "------------------opening the service------------------" curl $(minikube service local-devex-svc --url) ``` -------------------------------- ### Download and Install Minikube for Windows (Beta) Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/start/_index.md Downloads and installs the latest beta minikube release for Windows using PowerShell. It dynamically fetches the download URL from GitHub API and adds the binary to the system PATH. ```powershell New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force $response = Invoke-WebRequest -Uri 'https://api.github.com/repos/kubernetes/minikube/releases' -UseBasicParsing $json = $response.Content | ConvertFrom-Json $item = ($json | ?{ $_.prerelease -eq $true })[0].assets | ?{ $_.name -eq 'minikube-windows-amd64.exe' } Invoke-WebRequest -Uri $item.browser_download_url -OutFile 'c:\minikube\minikube.exe' -UseBasicParsing ``` ```powershell $oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) if ($oldPath.Split(';') -inotcontains 'C:\minikube'){ [Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine) } ``` -------------------------------- ### Install Minikube on macOS (ARM64) - Homebrew Source: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/start/_index.md Install Minikube on macOS ARM64 using the Homebrew package manager. Ensure Homebrew is installed. ```shell brew install minikube ```