Set up a Minikube cluster

How to setup a Minikube cluster

前期准备

Note

See the official Minikube documentation on drivers for details on supported drivers and how to install plugins.

Start the Minikube cluster

  1. If applicable for your project, set the default VM.

    1. minikube config set vm-driver [driver_name]
  2. Start the cluster. If necessary, specify version 1.13.x or newer of Kubernetes with --kubernetes-version

    1. minikube start --cpus=4 --memory=4096
  3. Enable the Minikube dashboard and ingress add-ons.

    1. # Enable dashboard
    2. minikube addons enable dashboard
    3. # Enable ingress
    4. minikube addons enable ingress

Install Helm v3 (optional)

If you are using Helm, install the Helm v3 client.

Important

The latest Dapr Helm chart no longer supports Helm v2. Migrate from Helm v2 to Helm v3.

Troubleshooting

The external IP address of load balancer is not shown from kubectl get svc.

In Minikube, EXTERNAL-IP in kubectl get svc shows <pending> state for your service. In this case, you can run minikube service [service_name] to open your service without external IP address.

  1. $ kubectl get svc
  2. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  3. ...
  4. calculator-front-end LoadBalancer 10.103.98.37 <pending> 80:30534/TCP 25h
  5. calculator-front-end-dapr ClusterIP 10.107.128.226 <none> 80/TCP,50001/TCP 25h
  6. ...
  7. $ minikube service calculator-front-end
  8. |-----------|----------------------|-------------|---------------------------|
  9. | NAMESPACE | NAME | TARGET PORT | URL |
  10. |-----------|----------------------|-------------|---------------------------|
  11. | default | calculator-front-end | | http://192.168.64.7:30534 |
  12. |-----------|----------------------|-------------|---------------------------|
  13. 🎉 Opening kubernetes service default/calculator-front-end in default browser...